W3C traceparent — Valid and Invalid Header Cases (txt)
A labelled set of traceparent header values: four that must parse — including a future version with extra fields, which parsers are required to accept — and eight that must be rejected, covering all-zero IDs, version ff, short and uppercase trace IDs, and missing or trailing fields.
# W3C Trace Context `traceparent` header values, one per line.
# Lines beginning with '#' are commentary; every other line is a header value to feed a parser.
# --- valid ---
00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
00-4bf92f3577b34da6a3ce929d0e0e4736-2b3c4d5e6f708192-00
00-7f8a9b0c1d2e3f405162738495a6b7c8-d6e7f8091a2b3c4d-03
# A future version with extra fields: parsers MUST accept the first four fields and ignore the rest.
cc-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01-extra-vendor-data
# --- invalid: must be rejected, and the request treated as un-traced ---
# all-zero trace id
00-00000000000000000000000000000000-00f067aa0ba902b7-01
# all-zero parent id
00-4bf92f3577b34da6a3ce929d0e0e4736-0000000000000000-01
# version ff is forbidden
ff-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
# trace id one character short
00-4bf92f3577b34da6a3ce929d0e0e473-00f067aa0ba902b7-01
# uppercase hex is not allowed
00-4BF92F3577B34DA6A3CE929D0E0E4736-00f067aa0ba902b7-01
# trailing field on version 00
00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01-
# missing flags
00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7
# non-hex characters in the trace id
00-4bf92f3577b34da6a3ce929d0e0e473g-00f067aa0ba902b7-01
Specifications
- Valid Cases
- 4
- Invalid Cases
- 8
- Spec
- W3C Trace Context Level 1
- Comment Prefix
- #
- Includes Future Version
- true
Testing contract
Reference control- Scenario
- Run each non-comment line through your trace-context header parser.
- Expected result
- Exactly 4 lines parse and 8 are rejected; the version-cc line parses by ignoring its trailing field rather than failing.
What is a .txt file?
TXT is a plain-text file containing unformatted character data with no styling or structure beyond line breaks. Its interpretation depends on character encoding, most commonly UTF-8, and on line-ending convention. It is the most universal and portable text container.
How to use this file
Use an example TXT to test encoding detection, line-ending (LF versus CRLF) handling, and any tool that reads or streams raw text input.
How to use this file for testing
“W3C traceparent — Valid and Invalid Header Cases (txt)” is a deterministic Novus Examples fixture for Observability, Schema validation, Error handling. Structured and plain-text telemetry with known timestamps, levels, request identifiers, and error states for testing log ingestion, correlation, dashboards, and alert pipelines.
Documented properties for this file: TXT · 1,250 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Telemetry fixtures use fixed trace IDs, span IDs, and timestamps so ingestion is reproducible run to run. Point your collector, parser, or query layer at the file and assert the documented span tree, metric families, or severity mix; service and host names are invented.
Related files
- jsonOTLP Trace — All-Zero Trace and Span IDs, Intentionally Invalid (json)A trace whose trace ID and root span ID are all zeroes — the value an uninitialised context produces. Intentionally invalid: the specification defines all-zero IDs as invalid, so a conformant receiver must reject the spans instead of creating a permanent bucket that every broken service writes into.

- jsonOTLP Trace — Duplicate Span IDs, Intentionally Invalid (json)Two different spans share one span ID inside a single trace, which the specification forbids. Intentionally invalid: it is the fixture for the de-duplication path, where a naive store silently overwrites one span with the other and loses a subtree.

- jsonOTLP Trace — Negative and Zero Durations, Intentionally Invalid (json)One span ends 8.4 ms before it started and another has identical start and end timestamps. Intentionally invalid: negative durations poison latency aggregates — a single one can drag a p99 below zero — so this is the fixture for the validation that must sit in front of any duration metric.

- promOpenMetrics — Missing # EOF Marker, Intentionally Invalid (prom)A document that parses perfectly as Prometheus text and is invalid as OpenMetrics, because the mandatory # EOF terminator is missing. That marker is the format's only defence against a truncated response being accepted as complete — which is the exact failure this file reproduces.

- promPrometheus Exposition — Broken Histograms, Intentionally Invalid (prom)Two histogram families that are syntactically fine and semantically wrong: one has non-monotonic buckets and no +Inf bucket, the other reports a _count larger than its +Inf bucket. Intentionally invalid, because histogram_quantile over either produces a confidently wrong number rather than an error.

- promPrometheus Exposition — Duplicate Series, Intentionally Invalid (prom)One label set exposed twice, a second pair that is only a duplicate once labels are sorted, and a repeated HELP line. Intentionally invalid: a scrape must fail rather than let last-write-wins decide which of two values for the same series survives.

Generated by generation/observability.py. Free for any use, no attribution required — license.