Skip to main content
Gå til innhold

Traces

Traces capture the timeline of a single request as it moves through your system, with one span per operation. For an introduction to traces and when to use them, see the OpenTelemetry tutorial and Choosing your signals.

On Platon, traces live in Tempo and are accessed through your team's Grafana organization.

Sending traces

Traces require application instrumentation with OpenTelemetry. If you have not set that up yet:

  1. Read the OpenTelemetry tutorial.
  2. Follow PaaS Full Observability for the environment variables.
  3. See the example apps for a working reference.

Viewing traces in Grafana

  1. Go to Grafana.
  2. Open Explore.
  3. Select your Tempo data source.
  4. Search by trace ID, service name, or duration.

Finding traces

  • By trace ID — typically taken from a log entry. Log lines include trace_id when OTel logging is wired up.
  • By service and operation — narrow to one endpoint on one service.
  • By duration — surface the slowest requests.
  • By status — filter to failures.

Jumping between signals

  • From a log entry with a trace_id attribute, click through to the full trace in Tempo.
  • From a metric exemplar, click through to a representative trace.
  • In Tempo, from a span, query Loki for logs matching that trace_id.

See Choosing your signals — Correlating the three signals for the full pattern.

Query language

Tempo uses TraceQL. For most teams, the search inputs in the Grafana Explore UI are sufficient. TraceQL is available when more power is needed. See the TraceQL documentation.

Traces are retained for 180 days by default. See Data Retention for details.

Context propagation

For traces to span services, trace context (the W3C traceparent header) must propagate between services. In almost every case, OTel auto-instrumentation handles this automatically. For the cases where manual handling is needed, see Choosing your signals — Tracing across services.

Learn more