Trace Correlation

Follow a request across multiple services by trace ID — see every log line involved in a single transaction.

Overview

When your services emit logs that include a trace_id, LogFlow can group all log lines from that trace into a chronological timeline — regardless of which service produced them. This makes it easy to understand exactly what happened during a single request or job.

Adding trace_id to your logs

Include trace_id as a field when ingesting logs:

// Node.js SDK
logger.info('Handling request', {
  trace_id: req.headers['x-trace-id'] ?? generateId(),
  user_id: req.user.id,
})

// HTTP API
POST /v1/logs
{
  "logs": [{
    "level": "info",
    "message": "Payment processed",
    "service": "payments",
    "trace_id": "abc123def456",
    "attributes": { "amount": 49.99 }
  }]
}

Any string works as a trace_id. Common choices: OpenTelemetry trace IDs, request IDs from your API gateway, or UUIDs you generate per-request.

Viewing a trace

There are two ways to open the trace view:

  • From log details — click any log line in the Explorer. If it has atrace_id, a View trace button appears next to it.
  • Via URL — add ?traceId=abc123 to the Logs Explorer URL to jump directly into trace view.

Trace timeline

In trace view, logs are displayed chronologically with:

  • A colored spine showing log level (green = info, yellow = warn, red = error)
  • Relative timestamps — e.g. +0ms, +23ms, +140ms from the first log in the trace
  • Service badges — each log line shows which service produced it

Time filters are disabled in trace view — you see every log line for that trace, regardless of when it was produced.

💡
If you are using OpenTelemetry, LogFlow automatically maps OTLP trace_id andspan_id fields. No extra configuration needed.

Clearing the trace view

A banner at the top of the Explorer shows the active trace ID. Click × to return to normal log search.