Skip to content
Novus Examples
txt1.2 KB

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.

Preview — first 26 linestxt
# 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.

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