OTLP 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.
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "checkout-api"
}
},
{
"key": "service.namespace",
"value": {
"stringValue": "shop"
}
},
{
"key": "service.version",
"value": {
"stringValue": "1.14.2"
}
},
{
"key": "service.instance.id",
"value": {
"stringValue": "checkout-api-7d9f4c-2xk"
}
},
{
"key": "deployment.environment.name",
"value": {
"stringValue": "staging"
}
},
{
"key": "host.name",
"value": {
"stringValue": "node-a1"
}
},
{
"key": "host.ip",
"value": {
"stringValue": "192.0.2.11"
}
},
{
"key": "cloud.region",
"value": {Specifications
- Spans
- 8
- Duplicated Span Id
- 4d5e6f708192a3b4
- Duplicate Count
- 2
- Intentionally Invalid
- true
- Rule
- span_id must be unique within a trace
Testing contract
Expected to fail- Scenario
- Ingest the trace and detect the ID collision.
- Expected result
- The receiver reports a duplicate span_id 4d5e6f708192a3b4 or keeps both spans distinctly; silently storing 7 spans instead of 8 is the failure this fixture catches.
What is a .json file?
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.
How to use this file
Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.
How to use this file for testing
“OTLP Trace — Duplicate Span IDs, Intentionally Invalid (json)” is a deterministic Novus Examples fixture for Observability, Error handling, Schema validation. 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: JSON · 19,437 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.
Code examples
import json
with open("otlp-trace-duplicate-span-ids.json") as f:
data = json.load(f)
print(type(data), len(data))Related files
- txtW3C 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.

- 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.

- txtB3 Propagation — Single and Multi-Header Forms (txt)B3 context propagation in both shapes — the compact single b3 header including the debug flag, a legacy 64-bit trace ID and the sampling-only form, plus the five X-B3-* multi-header fields — with two malformed values that must be rejected.

- jsonOTLP Trace — Clock Skew, Child Starts Before Its Parent (json)Two hosts whose clocks disagree by 12 ms, so a server span appears to start before the client span that called it. Nothing in the payload is malformed — this is the most common real cause of a negative-latency gap in a waterfall, and viewers must show it rather than crash or silently reorder.

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