OTLP Traces — NDJSON Stream, One Resource per Line (jsonl)
Two traces streamed as newline-delimited OTLP requests, one resource per line, so a single trace is split across several lines exactly as a line-oriented collector sink writes it. A fixture for streaming ingestion, back-pressure and partial-trace assembly.
{"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":{"stringValue":"eu-west-1"}},{"key":"k8s.namespace.name","value":{"stringValue":"shop"}},{"key":"k8s.pod.name","value":{"stringValue":"checkout-api-7d9f4c-2xk"}},{"key":"process.pid","value":{"intValue":"4211"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.language","value":{"stringValue":"java"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.34.0"}}]},"scopeSpans":[{"scope":{"name":"com.example.shop.checkout","version":"1.14.2"},"spans":[{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"00f067aa0ba902b7","parentSpanId":"","name":"POST /api/checkout","kind":2,"startTimeUnixNano":"1773738872850000000","endTimeUnixNano":"1773738872998200000","attributes":[{"key":"http.request.method","value":{"stringValue":"POST"}},{"key":"url.path","value":{"stringValue":"/api/checkout"}},{"key":"url.scheme","value":{"stringValue":"https"}},{"key":"http.response.status_code","value":{"intValue":"201"}},{"key":"http.route","value":{"stringValue":"/api/checkout"}},{"key":"server.address","value":{"stringValue":"shop.example.com"}},{"key":"client.address","value":{"stringValue":"203.0.113.42"}},{"key":"user_agent.original","value":{"stringValue":"shop-mobile/4.2.0 (iOS 18.3)"}},{"key":"enduser.id","value":{"stringValue":"cust-000418"}},{"key":"shop.order.id","value":{"stringValue":"ord-2026-0317-004182"}},{"key":"shop.cart.items","value":{"intValue":"3"}},{"key":"shop.order.total_minor","value":{"intValue":"8497"}},{"key":"shop.currency","value":{"stringValue":"EUR"}}],"events":[{"timeUnixNano":"1773738872851200000","name":"request.body.parsed","attributes":[{"key":"body.size_bytes","value":{"intValue":"612"}}]}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"1a2b3c4d5e6f7081","parentSpanId":"00f067aa0ba902b7","name":"auth.verify_token","kind":1,"startTimeUnixNano":"1773738872850900000","endTimeUnixNano":"1773738872855000000","attributes":[{"key":"auth.mechanism","value":{"stringValue":"jwt"}},{"key":"auth.token.kid","value":{"stringValue":"k-2026-03"}},{"key":"auth.cache.hit","value":{"boolValue":true}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"2b3c4d5e6f708192","parentSpanId":"00f067aa0ba902b7","name":"GET /cart/{cartId}","kind":3,"startTimeUnixNano":"1773738872855600000","endTimeUnixNano":"1773738872877000000","attributes":[{"key":"http.request.method","value":{"stringValue":"GET"}},{"key":"server.address","value":{"stringValue":"cart-api.shop.svc"}},{"key":"server.port","value":{"intValue":"8080"}},{"key":"http.response.status_code","value":{"intValue":"200"}},{"key":"network.protocol.version","value":{"stringValue":"1.1"}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"5e6f708192a3b4c5","parentSpanId":"00f067aa0ba902b7","name":"POST /inventory/reserve","kind":3,"startTimeUnixNano":"1773738872878000000","endTimeUnixNano":"1773738872917500000","attributes":[{"key":"http.request.method","value":{"stringValue":"POST"}},{"key":"server.address","value":{"stringValue":"inventory-api.shop.svc"}},{"key":"http.response.status_code","value":{"intValue":"200"}},{"key":"http.request.body.size","value":{"intValue":"214"}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"8192a3b4c5d6e7f8","parentSpanId":"00f067aa0ba902b7","name":"payments.authorize","kind":3,"startTimeUnixNano":"1773738872919000000","endTimeUnixNano":"1773738872990200000","attributes":[{"key":"rpc.system","value":{"stringValue":"grpc"}},{"key":"rpc.service","value":{"stringValue":"shop.payments.v1.Payments"}},{"key":"rpc.method","value":{"stringValue":"Authorize"}},{"key":"rpc.grpc.status_code","value":{"intValue":"0"}},{"key":"server.address","value":{"stringValue":"payments-api.shop.svc"}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"b4c5d6e7f8091a2b","parentSpanId":"00f067aa0ba902b7","name":"orders.created publish","kind":4,"startTimeUnixNano":"1773738872991900000","endTimeUnixNano":"1773738872995000000","attributes":[{"key":"messaging.system","value":{"stringValue":"kafka"}},{"key":"messaging.destination.name","value":{"stringValue":"orders.created"}},{"key":"messaging.operation.name","value":{"stringValue":"publish"}},{"key":"messaging.message.id","value":{"stringValue":"msg-0031882"}},{"key":"messaging.kafka.message.key","value":{"stringValue":"ord-2026-0317-004182"}},{"key":"messaging.destination.partition.id","value":{"stringValue":"2"}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"c5d6e7f8091a2b3c","parentSpanId":"00f067aa0ba902b7","name":"cache.get order-token","kind":1,"startTimeUnixNano":"1773738872995600000","endTimeUnixNano":"1773738872996500000","attributes":[{"key":"cache.operation","value":{"stringValue":"get"}},{"key":"cache.hit","value":{"boolValue":false}},{"key":"cache.key.prefix","value":{"stringValue":"order-token"}}],"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"cart-api"}},{"key":"service.namespace","value":{"stringValue":"shop"}},{"key":"service.version","value":{"stringValue":"0.9.7"}},{"key":"service.instance.id","value":{"stringValue":"cart-api-58bd21-9qh"}},{"key":"deployment.environment.name","value":{"stringValue":"staging"}},{"key":"host.name","value":{"stringValue":"node-a2"}},{"key":"host.ip","value":{"stringValue":"192.0.2.12"}},{"key":"cloud.region","value":{"stringValue":"eu-west-1"}},{"key":"k8s.namespace.name","value":{"stringValue":"shop"}},{"key":"k8s.pod.name","value":{"stringValue":"cart-api-58bd21-9qh"}},{"key":"process.pid","value":{"intValue":"1180"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.language","value":{"stringValue":"go"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.34.0"}}]},"scopeSpans":[{"scope":{"name":"github.com/example/shop/cart","version":"0.9.7"},"spans":[{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"3c4d5e6f708192a3","parentSpanId":"2b3c4d5e6f708192","name":"GET /cart/{cartId}","kind":2,"startTimeUnixNano":"1773738872856200000","endTimeUnixNano":"1773738872876300000","attributes":[{"key":"http.request.method","value":{"stringValue":"GET"}},{"key":"http.route","value":{"stringValue":"/cart/{cartId}"}},{"key":"http.response.status_code","value":{"intValue":"200"}},{"key":"shop.cart.id","value":{"stringValue":"cart-9f31a7"}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"4d5e6f708192a3b4","parentSpanId":"3c4d5e6f708192a3","name":"SELECT shop.carts","kind":3,"startTimeUnixNano":"1773738872857300000","endTimeUnixNano":"1773738872875100000","attributes":[{"key":"db.system.name","value":{"stringValue":"postgresql"}},{"key":"db.namespace","value":{"stringValue":"shop"}},{"key":"db.collection.name","value":{"stringValue":"carts"}},{"key":"db.operation.name","value":{"stringValue":"SELECT"}},{"key":"db.query.text","value":{"stringValue":"SELECT id, customer_id, currency\n FROM shop.carts\n WHERE id = $1\n AND deleted_at IS NULL"}},{"key":"db.response.returned_rows","value":{"intValue":"1"}},{"key":"server.address","value":{"stringValue":"pg-primary.shop.svc"}}],"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"inventory-api"}},{"key":"service.namespace","value":{"stringValue":"shop"}},{"key":"service.version","value":{"stringValue":"2.3.0"}},{"key":"service.instance.id","value":{"stringValue":"inventory-api-0c73aa-4rt"}},{"key":"deployment.environment.name","value":{"stringValue":"staging"}},{"key":"host.name","value":{"stringValue":"node-b1"}},{"key":"host.ip","value":{"stringValue":"192.0.2.21"}},{"key":"cloud.region","value":{"stringValue":"eu-west-1"}},{"key":"k8s.namespace.name","value":{"stringValue":"shop"}},{"key":"k8s.pod.name","value":{"stringValue":"inventory-api-0c73aa-4rt"}},{"key":"process.pid","value":{"intValue":"990"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.language","value":{"stringValue":"go"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.34.0"}}]},"scopeSpans":[{"scope":{"name":"github.com/example/shop/inventory","version":"2.3.0"},"spans":[{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"6f708192a3b4c5d6","parentSpanId":"5e6f708192a3b4c5","name":"POST /inventory/reserve","kind":2,"startTimeUnixNano":"1773738872878700000","endTimeUnixNano":"1773738872916900000","attributes":[{"key":"http.request.method","value":{"stringValue":"POST"}},{"key":"http.route","value":{"stringValue":"/inventory/reserve"}},{"key":"http.response.status_code","value":{"intValue":"200"}},{"key":"shop.sku.count","value":{"intValue":"3"}}],"events":[{"timeUnixNano":"1773738872887700000","name":"reservation.locked","attributes":[{"key":"shop.warehouse","value":{"stringValue":"wh-eu-2"}}]}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"708192a3b4c5d6e7","parentSpanId":"6f708192a3b4c5d6","name":"UPDATE shop.inventory","kind":3,"startTimeUnixNano":"1773738872880100000","endTimeUnixNano":"1773738872915000000","attributes":[{"key":"db.system.name","value":{"stringValue":"postgresql"}},{"key":"db.namespace","value":{"stringValue":"shop"}},{"key":"db.collection.name","value":{"stringValue":"inventory"}},{"key":"db.operation.name","value":{"stringValue":"UPDATE"}},{"key":"db.query.text","value":{"stringValue":"UPDATE shop.inventory\n SET reserved = reserved + $2\n WHERE sku = $1"}},{"key":"db.response.returned_rows","value":{"intValue":"3"}}],"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"payments-api"}},{"key":"service.namespace","value":{"stringValue":"shop"}},{"key":"service.version","value":{"stringValue":"3.1.4"}},{"key":"service.instance.id","value":{"stringValue":"payments-api-31ef60-7wz"}},{"key":"deployment.environment.name","value":{"stringValue":"staging"}},{"key":"host.name","value":{"stringValue":"node-b2"}},{"key":"host.ip","value":{"stringValue":"192.0.2.22"}},{"key":"cloud.region","value":{"stringValue":"eu-west-1"}},{"key":"k8s.namespace.name","value":{"stringValue":"shop"}},{"key":"k8s.pod.name","value":{"stringValue":"payments-api-31ef60-7wz"}},{"key":"process.pid","value":{"intValue":"7452"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.language","value":{"stringValue":"python"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.34.0"}}]},"scopeSpans":[{"scope":{"name":"example.shop.payments","version":"3.1.4"},"spans":[{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"92a3b4c5d6e7f809","parentSpanId":"8192a3b4c5d6e7f8","name":"payments.authorize","kind":2,"startTimeUnixNano":"1773738872919800000","endTimeUnixNano":"1773738872989900000","attributes":[{"key":"rpc.system","value":{"stringValue":"grpc"}},{"key":"rpc.method","value":{"stringValue":"Authorize"}},{"key":"rpc.grpc.status_code","value":{"intValue":"0"}},{"key":"shop.payment.method","value":{"stringValue":"card"}},{"key":"shop.payment.amount_minor","value":{"intValue":"8497"}}],"status":{}},{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"a3b4c5d6e7f8091a","parentSpanId":"92a3b4c5d6e7f809","name":"POST /v1/charges","kind":3,"startTimeUnixNano":"1773738872921500000","endTimeUnixNano":"1773738872988400000","attributes":[{"key":"http.request.method","value":{"stringValue":"POST"}},{"key":"server.address","value":{"stringValue":"psp.example.net"}},{"key":"http.response.status_code","value":{"intValue":"201"}},{"key":"http.request.resend_count","value":{"intValue":"0"}},{"key":"shop.psp.reference","value":{"stringValue":"psp-ref-7710294"}}],"events":[{"timeUnixNano":"1773738872962500000","name":"psp.tokenized","attributes":[{"key":"shop.psp.token.suffix","value":{"stringValue":"4242"}}]}],"status":{}}]}]}]}
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"notifier"}},{"key":"service.namespace","value":{"stringValue":"shop"}},{"key":"service.version","value":{"stringValue":"0.4.11"}},{"key":"service.instance.id","value":{"stringValue":"notifier-9a4d17-1pv"}},{"key":"deployment.environment.name","value":{"stringValue":"staging"}},{"key":"host.name","value":{"stringValue":"node-c1"}},{"key":"host.ip","value":{"stringValue":"192.0.2.31"}},{"key":"cloud.region","value":{"stringValue":"eu-west-1"}},{"key":"k8s.namespace.name","value":{"stringValue":"shop"}},{"key":"k8s.pod.name","value":{"stringValue":"notifier-9a4d17-1pv"}},{"key":"process.pid","value":{"intValue":"3307"}},{"key":"telemetry.sdk.name","value":{"stringValue":"opentelemetry"}},{"key":"telemetry.sdk.language","value":{"stringValue":"nodejs"}},{"key":"telemetry.sdk.version","value":{"stringValue":"1.34.0"}}]},"scopeSpans":[{"scope":{"name":"@example/shop-notifier","version":"0.4.11"},"spans":[{"traceId":"7f8a9b0c1d2e3f405162738495a6b7c8","spanId":"d6e7f8091a2b3c4d","parentSpanId":"","name":"orders.created process","kind":5,"startTimeUnixNano":"1773738873252000000","endTimeUnixNano":"1773738873278400000","attributes":[{"key":"messaging.system","value":{"stringValue":"kafka"}},{"key":"messaging.destination.name","value":{"stringValue":"orders.created"}},{"key":"messaging.operation.name","value":{"stringValue":"process"}},{"key":"messaging.batch.message_count","value":{"intValue":"4"}}],"links":[{"traceId":"4bf92f3577b34da6a3ce929d0e0e4736","spanId":"b4c5d6e7f8091a2b","attributes":[{"key":"messaging.message.id","value":{"stringValue":"msg-0031882"}}]}],"status":{}},{"traceId":"7f8a9b0c1d2e3f405162738495a6b7c8","spanId":"e7f8091a2b3c4d5e","parentSpanId":"d6e7f8091a2b3c4d","name":"INSERT shop.notifications","kind":3,"startTimeUnixNano":"1773738873254100000","endTimeUnixNano":"1773738873263300000","attributes":[{"key":"db.system.name","value":{"stringValue":"postgresql"}},{"key":"db.operation.name","value":{"stringValue":"INSERT"}},{"key":"db.collection.name","value":{"stringValue":"notifications"}}],"status":{}},{"traceId":"7f8a9b0c1d2e3f405162738495a6b7c8","spanId":"f8091a2b3c4d5e6f","parentSpanId":"d6e7f8091a2b3c4d","name":"email.send","kind":3,"startTimeUnixNano":"1773738873264800000","endTimeUnixNano":"1773738873277700000","attributes":[{"key":"messaging.system","value":{"stringValue":"smtp"}},{"key":"server.address","value":{"stringValue":"smtp.example.net"}},{"key":"shop.notification.template","value":{"stringValue":"order-confirmation"}}],"status":{}}]}]}]}
Specifications
- Lines
- 5
- Traces
- 2
- Spans
- 16
- Framing
- one ExportTraceServiceRequest per line
- Trace Split Across Lines
- true
Testing contract
Expected to pass- Scenario
- Stream the file line by line and assemble complete traces.
- Expected result
- 5 independently parseable lines assemble into 2 traces and 16 spans; a consumer that expects one trace per line reports 5 traces instead.
What is a .jsonl file?
JSONL (JSON Lines) is a text format where each line is a complete, independent JSON value, allowing records to be streamed and appended without parsing the whole file. It is not itself a JSON array and each line must stand alone. It is common in logging, machine learning datasets, and data pipelines.
How to use this file
Use an example JSONL to test line-by-line streaming parsers, append-and-resume ingestion, and batch pipelines that process one record per line.
How to use this file for testing
“OTLP Traces — NDJSON Stream, One Resource per Line (jsonl)” is a deterministic Novus Examples fixture for Observability, JSON parsing, Data engineering. 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: JSONL · 14,939 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-traces-stream.jsonl") as f:
rows = [json.loads(line) for line in f]
print(len(rows), rows[0])Related files
- jsonOTLP Trace — Spans Batched in Reverse Completion Order (json)The canonical checkout trace with its spans emitted in the order they finished — children before parents, deepest first. This is what a real batch exporter produces, and a consumer that assumes parents arrive first will drop or orphan most of the trace.

- jsonlOTLP Logs — NDJSON Stream, One Record per Line (jsonl)The same five OTLP log records reframed as one self-contained export per line, with the resource attributes repeated on every line. The trade a line-oriented sink makes: each line stands alone, at the cost of repeating the resource block five times.

- jsonJaeger JSON Trace — Same 13-Span Checkout (json)The checkout trace in the Jaeger query-API shape — a data array holding one trace, spans carrying microsecond startTime and duration, CHILD_OF references, typed tags and a per-service processes map. The same span tree as the OTLP and Zipkin twins, so a converter can be scored exactly.

- jsonOTLP Trace — 48-Span Linear Chain (json)A single-service trace 48 levels deep — a recursive GraphQL-style resolver where every span is the child of the one before it. A depth fixture for waterfall renderers, tree-layout code and any parser that recurses over parentage.

- jsonOTLP Trace — 60-Way Parallel Fan-Out (json)One root span with 60 overlapping children — a scatter-gather query across database shards. The counterpart to the deep-chain fixture: shallow but very wide, which is what breaks waterfall layouts that assume spans do not overlap in time.

- jsonOTLP Trace — AnyValue Attribute Type Matrix (json)One span carrying every OTLP AnyValue kind — string (plain, Unicode, multi-line, empty), int64 encoded as a JSON string, double, bool, array, nested kvlist and base64 bytes. Includes an integer above 2^53 to catch decoders that route int64 through a JavaScript number.

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