Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tracelit.io/llms.txt

Use this file to discover all available pages before exploring further.

Tracelit’s backend SDKs speak OpenTelemetry natively. Drop in the SDK and every inbound request, outbound call, and database query becomes a span — stitched into a single distributed trace across all your services.

Automatic instrumentation

Call one function and the SDK instruments your entire runtime. No per-library config.
Library / FrameworkNode.jsGoRuby.NET
HTTP server
HTTP client
SQL / ORM
Redis
gRPC
Message queues
GraphQL

Manual spans

Add custom spans anywhere in your code to trace business-level operations.
import Tracelit from "@tracelit/sdk";

const result = await Tracelit.tracer.startActiveSpan("process-payment", async (span) => {
  span.setAttribute("payment.id", payment.id);
  span.setAttribute("payment.currency", currency);

  try {
    return await processPayment(payment);
  } catch (err) {
    span.recordException(err as Error);
    span.setStatus({ code: 2, message: (err as Error).message });
    throw err;
  } finally {
    span.end();
  }
});

Span kinds

Use the correct span kind so Tracelit renders the right context in the trace view.
KindWhen to use
InternalDefault — internal operation with no external I/O
ServerInbound request handler (HTTP, gRPC)
ClientOutbound call (HTTP, gRPC, database)
ProducerMessage publish
ConsumerMessage consume

Context propagation

Trace context is propagated automatically across service boundaries using standard W3C TraceContext headers. Every SDK injects and extracts these headers on all instrumented HTTP and gRPC calls with no extra code. For manual propagation (e.g. message queues or async jobs):
import { propagation, context } from "@opentelemetry/api";

// Inject into message headers before publishing
const carrier: Record<string, string> = {};
propagation.inject(context.active(), carrier);
await queue.publish({ ...message, headers: carrier });

// Extract on the consumer side
const ctx = propagation.extract(context.active(), message.headers);
Tracelit.tracer.startActiveSpan("process-job", { context: ctx }, async (span) => {
  // ...
  span.end();
});

Error guarantee

Tracelit’s SDKs guarantee that error spans are always exported — even when the parent trace falls outside your configured sample rate. This ensures no error goes undetected regardless of sampling settings.
Error spans bypass the sampler entirely. Setting sampleRate: 0.1 keeps 10% of normal traces but 100% of error spans always reach Tracelit.

Viewing traces

All traces are available in the Traces tab of your service in the Tracelit dashboard. You can:
  • Filter by service, environment, status, and time range
  • Drill into any trace to see the full span tree with timings and attributes
  • Jump directly from a trace to the linked incident or error

Learn more

Node.js SDK

Express, Fastify, NestJS, and more — auto-instrumented.

Go SDK

Idiomatic functional-options API with goroutine-safe propagation.

Ruby SDK

Rails, Sinatra, Rack — zero-touch setup via Railtie.

.NET SDK

ASP.NET Core DI integration with HttpClient and SqlClient traces.