Skip to content
Novus Examples
jsonl4 KB

Structured Log — Trace-Correlated Records (jsonl)

One log record per span of the canonical checkout trace, each carrying trace_id, span_id, parent_span_id and trace flags. The logs-to-traces jump with a target that actually exists in this catalog, so a correlation query can be verified end to end.

Preview — first 14 linesjsonl
{"ts":"2026-03-17T09:14:32.850Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: POST /api/checkout","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"00f067aa0ba902b7","parent_span_id":null,"trace_flags":"01","duration_ms":148.2}
{"ts":"2026-03-17T09:14:32.850Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: auth.verify_token","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"1a2b3c4d5e6f7081","parent_span_id":"00f067aa0ba902b7","trace_flags":"01","duration_ms":4.1}
{"ts":"2026-03-17T09:14:32.855Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: GET /cart/{cartId}","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"2b3c4d5e6f708192","parent_span_id":"00f067aa0ba902b7","trace_flags":"01","duration_ms":21.4}
{"ts":"2026-03-17T09:14:32.856Z","level":"info","service":"cart-api","host":"node-a2","logger":"github.com/example/shop/cart","msg":"span started: GET /cart/{cartId}","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"3c4d5e6f708192a3","parent_span_id":"2b3c4d5e6f708192","trace_flags":"01","duration_ms":20.1}
{"ts":"2026-03-17T09:14:32.857Z","level":"info","service":"cart-api","host":"node-a2","logger":"github.com/example/shop/cart","msg":"span started: SELECT shop.carts","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"4d5e6f708192a3b4","parent_span_id":"3c4d5e6f708192a3","trace_flags":"01","duration_ms":17.8}
{"ts":"2026-03-17T09:14:32.878Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: POST /inventory/reserve","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"5e6f708192a3b4c5","parent_span_id":"00f067aa0ba902b7","trace_flags":"01","duration_ms":39.5}
{"ts":"2026-03-17T09:14:32.878Z","level":"info","service":"inventory-api","host":"node-b1","logger":"github.com/example/shop/inventory","msg":"span started: POST /inventory/reserve","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"6f708192a3b4c5d6","parent_span_id":"5e6f708192a3b4c5","trace_flags":"01","duration_ms":38.2}
{"ts":"2026-03-17T09:14:32.880Z","level":"info","service":"inventory-api","host":"node-b1","logger":"github.com/example/shop/inventory","msg":"span started: UPDATE shop.inventory","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"708192a3b4c5d6e7","parent_span_id":"6f708192a3b4c5d6","trace_flags":"01","duration_ms":34.9}
{"ts":"2026-03-17T09:14:32.919Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: payments.authorize","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"8192a3b4c5d6e7f8","parent_span_id":"00f067aa0ba902b7","trace_flags":"01","duration_ms":71.2}
{"ts":"2026-03-17T09:14:32.919Z","level":"info","service":"payments-api","host":"node-b2","logger":"example.shop.payments","msg":"span started: payments.authorize","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"92a3b4c5d6e7f809","parent_span_id":"8192a3b4c5d6e7f8","trace_flags":"01","duration_ms":70.1}
{"ts":"2026-03-17T09:14:32.921Z","level":"error","service":"payments-api","host":"node-b2","logger":"example.shop.payments","msg":"span started: POST /v1/charges","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"a3b4c5d6e7f8091a","parent_span_id":"92a3b4c5d6e7f809","trace_flags":"01","duration_ms":66.9}
{"ts":"2026-03-17T09:14:32.991Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: orders.created publish","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"b4c5d6e7f8091a2b","parent_span_id":"00f067aa0ba902b7","trace_flags":"01","duration_ms":3.1}
{"ts":"2026-03-17T09:14:32.995Z","level":"info","service":"checkout-api","host":"node-a1","logger":"com.example.shop.checkout","msg":"span started: cache.get order-token","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"c5d6e7f8091a2b3c","parent_span_id":"00f067aa0ba902b7","trace_flags":"01","duration_ms":0.9}

Specifications

Lines
13
Trace Id
4bf92f3577b34da6a3ce929d0e0e4736
Distinct Span Ids
13
Has Parent Span Id
true
Trace Flags
01
Resolves Against
otlp-json-trace-checkout

Testing contract

Expected to pass
Scenario
Query the logs by trace_id and join each record to its span.
Expected result
All 13 records share trace 4bf92f3577b34da6a3ce929d0e0e4736 and every span_id resolves to a span in the OTLP trace fixture, with exactly one record whose parent_span_id is null.

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

“Structured Log — Trace-Correlated Records (jsonl)” is a deterministic Novus Examples fixture for Observability, Log parsing, JSON parsing. 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 · 4,143 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("app-trace-correlated.jsonl") as f:
    rows = [json.loads(line) for line in f]
print(len(rows), rows[0])

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