traceparent string required Raw traceparent field value, bounded to 512 characters. Lowercase hexadecimal is required.
Validate and explain W3C traceparent and tracestate values, including versioning, zero-ID checks, sampled flags and vendor-entry grammar.
Authoritative reference data or standards computation
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
traceparent
required
| string | allowed: 1 – 512 example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 | Raw traceparent field value, bounded to 512 characters. Lowercase hexadecimal is required. |
tracestate | string | allowed: ≤ 2048 example: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE | Optional combined tracestate value; this endpoint caps input at 2048 characters and 32 list-members. |
traceparent string required Raw traceparent field value, bounded to 512 characters. Lowercase hexadecimal is required.
tracestate string Optional combined tracestate value; this endpoint caps input at 2048 characters and 32 list-members.
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
fields | list | example: valid,traceparentValid | Return only these fields (comma-separated). Mutually exclusive with 'exclude'. |
exclude | list | example: warnings | Return all fields except these (comma-separated). |
pretty | boolean | default: false example: true | Pretty-print the JSON response. |
unwrap | boolean | default: false example: true | Drop the envelope: return the raw array/object without data/meta wrapper. |
fields list Return only these fields (comma-separated). Mutually exclusive with 'exclude'.
exclude list Return all fields except these (comma-separated).
pretty boolean Pretty-print the JSON response.
unwrap boolean Drop the envelope: return the raw array/object without data/meta wrapper.
| Field | Type | Description | Example |
|---|---|---|---|
valid | boolean | Whether traceparent and any supplied tracestate are both valid. | true |
traceparentValid | boolean | Whether the traceparent common fields and version rules are valid. | true |
tracestateValid nullable | boolean | Whether supplied tracestate is valid; null when absent or skipped after bad traceparent. | true |
version nullable | string | Two-character lowercase version when its prefix could be parsed. | 00 |
traceId nullable | string | 32-character nonzero trace ID when valid. | 4bf92f3577b34da6a3ce929d0e0e4736 |
parentId nullable | string | 16-character nonzero parent ID when valid. | 00f067aa0ba902b7 |
traceFlags nullable | string | Two-character received flags byte when valid. | 01 |
sampled nullable | boolean | Whether the least-significant sampled flag is set. | true |
unknownFlags nullable | string | Hex mask for every received flag bit not defined by Trace Context 1.1. | 00 |
futureVersion nullable | boolean | Whether the parsed version is higher than 00. | false |
tracestateEntries | object[] | Valid vendor entries in received order; empty when absent, invalid or skipped. | [{"key":"rojo","value":"00f067aa0ba902b7","index":0}] |
canonicalTraceparent nullable | string | Validated traceparent, or null when invalid. | 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01 |
canonicalTracestate nullable | string | Whitespace-normalized valid tracestate, or null when absent/invalid/skipped. | rojo=00f067aa0ba902b7,congo=t61rcWkgMzE |
errors | object[] | Ordered validation failures with code, field and message. | [] |
warnings | object[] | Non-fatal notices such as unknown flag bits or skipped tracestate. | [] |
valid boolean Whether traceparent and any supplied tracestate are both valid.
example: true
traceparentValid boolean Whether the traceparent common fields and version rules are valid.
example: true
tracestateValid boolean nullable Whether supplied tracestate is valid; null when absent or skipped after bad traceparent.
example: true
version string nullable Two-character lowercase version when its prefix could be parsed.
example: 00
traceId string nullable 32-character nonzero trace ID when valid.
example: 4bf92f3577b34da6a3ce929d0e0e4736
parentId string nullable 16-character nonzero parent ID when valid.
example: 00f067aa0ba902b7
traceFlags string nullable Two-character received flags byte when valid.
example: 01
sampled boolean nullable Whether the least-significant sampled flag is set.
example: true
unknownFlags string nullable Hex mask for every received flag bit not defined by Trace Context 1.1.
example: 00
futureVersion boolean nullable Whether the parsed version is higher than 00.
example: false
tracestateEntries object[] Valid vendor entries in received order; empty when absent, invalid or skipped.
example: [{"key":"rojo","value":"00f067aa0ba902b7","index":0}]
canonicalTraceparent string nullable Validated traceparent, or null when invalid.
example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
canonicalTracestate string nullable Whitespace-normalized valid tracestate, or null when absent/invalid/skipped.
example: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
errors object[] Ordered validation failures with code, field and message.
example: []
warnings object[] Non-fatal notices such as unknown flag bits or skipped tracestate.
example: []
/api/trace-context/validate?traceparent=00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01&tracestate=rojo%3D00f067aa0ba902b7%2Ccongo%3Dt61rcWkgMzE {
"data": {
"valid": true,
"traceparentValid": true,
"tracestateValid": true,
"version": "00",
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"parentId": "00f067aa0ba902b7",
"traceFlags": "01",
"sampled": true,
"unknownFlags": "00",
"futureVersion": false,
"tracestateEntries": [
{
"key": "rojo",
"value": "00f067aa0ba902b7",
"index": 0
},
{
"key": "congo",
"value": "t61rcWkgMzE",
"index": 1
}
],
"canonicalTraceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"canonicalTracestate": "rojo=00f067aa0ba902b7,congo=t61rcWkgMzE",
"errors": [],
"warnings": []
},
"meta": {
"endpoint": "trace-context",
"route": "/validate",
"params": {
"traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"tracestate": "rojo=00f067aa0ba902b7,congo=t61rcWkgMzE"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/trace-context/validate?traceparent=00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00 {
"data": {
"valid": true,
"traceparentValid": true,
"tracestateValid": null,
"version": "00",
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"parentId": "00f067aa0ba902b7",
"traceFlags": "00",
"sampled": false,
"unknownFlags": "00",
"futureVersion": false,
"tracestateEntries": [],
"canonicalTraceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00",
"canonicalTracestate": null,
"errors": [],
"warnings": []
},
"meta": {
"endpoint": "trace-context",
"route": "/validate",
"params": {
"traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/trace-context/validate?traceparent=01-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01-extra {
"data": {
"valid": true,
"traceparentValid": true,
"tracestateValid": null,
"version": "01",
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"parentId": "00f067aa0ba902b7",
"traceFlags": "01",
"sampled": true,
"unknownFlags": "00",
"futureVersion": true,
"tracestateEntries": [],
"canonicalTraceparent": "01-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01-extra",
"canonicalTracestate": null,
"errors": [],
"warnings": []
},
"meta": {
"endpoint": "trace-context",
"route": "/validate",
"params": {
"traceparent": "01-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01-extra"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} Validates the two interoperable HTTP field values defined by the W3C Trace Context Recommendation. traceparent is decomposed into its version, 16-byte trace ID, 8-byte parent ID and flags; the sampled bit is reported separately while unknown received bits are preserved and warned about rather than reinterpreted.
Version 00 must be exactly 55 lowercase characters. The forbidden ff version, uppercase hexadecimal, malformed delimiters and all-zero IDs are invalid. Higher versions follow W3C's forward-compatible common-prefix rules: the version-00 fields are parsed, extension data is left opaque and no future semantics are invented.
When supplied, tracestate is parsed only after a valid traceparent, just as the processing model requires. It accepts at most 32 list-members, supports simple and multi-tenant keys, rejects duplicate keys, and validates each opaque value's printable-ASCII bounds. Empty list-members are accepted but omitted from canonical output.
Ordinary invalid header values return 200 with valid:false and ordered reason codes, making the endpoint useful in test suites. The query parser still returns 400 for a missing required parameter or values beyond the endpoint's explicit resource bounds. This API validates syntax and interoperable field semantics; it does not contact a tracing backend or prove that a trace exists.
Common failures include uppercase hexadecimal, a forbidden ff version, wrong field lengths or delimiters, and all-zero trace or parent IDs.
Yes. It validates the common prefix required by W3C, marks the version as future, and deliberately leaves extension fields opaque instead of guessing their meaning.
Only after traceparent succeeds. The validator enforces the 32-member limit, key grammar, unique keys and bounded printable-ASCII values while preserving vendor order.
No. It proves only that the supplied field values follow W3C Trace Context syntax and shared semantics; no collector or vendor backend is queried.
Generate coherent mock distributed traces and individual spans with bounded timing, parentage, service filters and reproducible failures.
Complete pinned IANA HTTP field-name registry with status, Structured Field type, references, search and case-insensitive lookup.
Generate coherent fake audit records for authentication, CRUD and permission changes — safely seeded, filterable and bounded by time.
Generate coherent webhook delivery histories with safe destinations, bounded retries, status-specific attempts and event-shaped payloads.
Generate coherent mock CloudEvents 1.0 structured JSON envelopes with all required context attributes and action-specific event data.