---
title: "Tracing"
description: "Follow one request or job across every message it wrote."
canonical_url: "https://docs.logstrace.dev/guides/sending-logs/tracing"
---
# Tracing

> Follow one request or job across every message it wrote.

Give every event written while handling one request the same `traceId`. Use `spanId` for steps inside it.

```json
{ "events": [
  { "channel": "api",      "traceId": "req-7f3a9c", "spanId": "http",  "text": "POST /checkout started" },
  { "channel": "payments", "traceId": "req-7f3a9c", "spanId": "charge", "text": "Payment 8813 for order 10294 declined 120.00 USD", "level": "warn" },
  { "channel": "api",      "traceId": "req-7f3a9c", "spanId": "http",  "text": "POST /checkout finished 402 in 318 ms" }
] }
```

- IDs: up to 128 characters of letters, digits and `- _ . :`.
- `trace_id`, `span_id`, `parentId` and `parent_id` are accepted too, at the top level or inside `data`.
- In **Logs**, open a message and click **Show its trace**, or type the ID in the **Trace id** filter (under **More filters**). The filter is kept in the URL, so you can share the link.

<tip>

Already have a request ID (from a load balancer, `X-Request-Id`, or OpenTelemetry)? Use it as `traceId` so you can jump between tools.

</tip>


## Sitemap

See the full [sitemap](https://docs.logstrace.dev/sitemap.md) for all pages.
