Free tool

Traceparent header decoder

Paste a traceparent header to read its trace ID, parent span ID and sampled flag, and to check it against the W3C Trace Context specification. It runs in your browser: nothing you paste is sent anywhere.

The value alone, or the whole line as it appears in a log or a curl command.

Vendor key=value pairs, separated by commas.

Valid traceparent header

version
00
trace-id
0af7651916cd43dd8448eb211c80319c
parent-id
b7ad6b7169203331
trace-flags
01Sampled: the caller recorded this request

Valid tracestate header: 2 list members

KeyValueCheck
rojo00f067aa0ba902b7OK
congot61rcWkgMzEOK
The format

Four fields, joined by dashes

A version 00 traceparent header is always 55 characters: 2 for the version, 32 for the trace ID, 16 for the parent ID and 2 for the flags, in lowercase hexadecimal, with a dash between each.

version

The format version, one byte. 00 is the only version defined today. ff is forbidden.

trace-id

The ID of the whole trace, 16 bytes. Every service the request passes through keeps it unchanged. All zeros is invalid.

parent-id

The ID of the caller's span, 8 bytes. The service that receives the header starts its own span as a child of this one. All zeros is invalid.

trace-flags

One byte of flags. The lowest bit is sampled: the caller recorded this request. Level 2 of the specification adds a second bit that says the trace ID was generated randomly.

Why a header is rejected

What makes a traceparent invalid

A service that receives an invalid traceparent ignores it and starts a new trace, so the request shows up as two unconnected traces instead of one. These are the checks this page runs.

  • A traceparent holds only the characters 0 to 9, a to f and dashes. This one has something else in it, often a space, a quote or a second header pasted along.
  • The hexadecimal digits must be lowercase. A header with A to F in capitals is invalid, even though the bytes are the same.
  • There are fewer than four fields. The format is version, trace ID, parent ID and flags, with a dash between each.
  • The version must be exactly two hexadecimal digits, such as 00.
  • Version ff is forbidden by the specification.
  • The trace ID must be exactly 32 hexadecimal digits (16 bytes). A 16-digit ID is the older 64-bit format some tracers used and has to be left-padded with zeros.
  • The trace ID is all zeros, which the specification reserves as invalid.
  • The parent ID must be exactly 16 hexadecimal digits (8 bytes).
  • The parent ID is all zeros, which the specification reserves as invalid.
  • The flags must be exactly two hexadecimal digits, such as 01.
  • Version 00 has exactly four fields, and this header has more. Only a later version may add fields after the flags.
Try it

Send a request that joins a trace

OpenTelemetry SDKs read and write traceparent by default, and so do the Vigilon SDKs for Node.js and Python, which are built on them. Send the header with a request and the service's spans join that trace ID as children of the parent ID, which makes it a quick test that context is propagated across a proxy, a queue or a service you do not own.

curl
curl -i https://api.example.com/orders/42 \
  -H "traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"

If the service answers with a different trace ID in its own outgoing calls, something in between dropped or rewrote the header.

Questions

Traceparent questions

What is the traceparent header?

It is the HTTP header the W3C Trace Context specification defines for passing a trace from one service to the next. It carries four fields: a version, the trace ID, the ID of the calling span and a byte of flags. Each service reads it, starts its own span under the calling span and sends an updated header on its outgoing calls.

What does the 01 at the end of a traceparent mean?

It is the flags byte with the sampled bit set: the caller recorded this request and suggests the next service does too. 00 means the caller may not have recorded it. It is a hint, not a guarantee that the trace is stored. A backend that samples after a request finishes makes its own decision.

What is the difference between traceparent and tracestate?

traceparent identifies the request in a format every tracing system shares. tracestate is optional and carries vendor data as up to 32 key=value pairs, for example a vendor's own sampling decision. A service may add or update its own entry, and must pass the other entries on unchanged.

Is the parent ID the same as a span ID?

Yes. The parent-id field holds the span ID of the service that sent the request. Some tracing systems call the field span-id for that reason. The receiving service uses it as the parent of the span it starts.

Does this page send my header anywhere?

No. The header is parsed by JavaScript in your browser and is never sent to Vigilon or anyone else. Trace IDs are identifiers, not secrets, but they do not need to leave your machine to be checked.

Get started

Start free for two months.

Pick a plan, add the SDK, and Vigilon starts watching your app. Starter is free for your first two months, with no card needed.