Skip to content
Novus Examples
jsonl5.3 KB

Structured Log — Out-of-Order Timestamps (jsonl)

Records whose ts field moves backwards seven times while emitted_seq stays monotonic — what a buffered shipper produces when several workers flush concurrently. The fixture for sort-on-ingest, late-arrival windows and any index that assumes append order equals time order.

Preview — first 16 linesjsonl
{"ts":"2026-03-17T09:14:32.850Z","level":"info","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.OrderController","msg":"request completed","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":470.84},"request_id":"req-000001","order_id":"ord-2026-0317-004259","seq":1,"emitted_seq":1}
{"ts":"2026-03-17T09:14:33.250Z","level":"error","service":"inventory-api","version":"2.3.0","env":"staging","host":"node-b1","logger":"shop/inventory/reserve","msg":"insufficient stock for reservation","http":{"method":"POST","route":"/api/orders","status":409,"duration_ms":240.13},"request_id":"req-000002","order_id":"ord-2026-0317-007154","seq":2,"emitted_seq":2}
{"ts":"2026-03-17T09:14:33.050Z","level":"debug","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.PricingService","msg":"recomputed cart totals","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":117.99},"request_id":"req-000003","order_id":"ord-2026-0317-002317","seq":3,"emitted_seq":3}
{"ts":"2026-03-17T09:14:33.750Z","level":"info","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.OrderController","msg":"request completed","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":41.57},"request_id":"req-000004","order_id":"ord-2026-0317-007199","seq":4,"emitted_seq":4}
{"ts":"2026-03-17T09:14:33.450Z","level":"debug","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.PricingService","msg":"recomputed cart totals","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":86.4},"request_id":"req-000005","order_id":"ord-2026-0317-002617","seq":5,"emitted_seq":5}
{"ts":"2026-03-17T09:14:34.350Z","level":"info","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.OrderController","msg":"request completed","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":1.62},"request_id":"req-000006","order_id":"ord-2026-0317-003362","seq":6,"emitted_seq":6}
{"ts":"2026-03-17T09:14:33.950Z","level":"warn","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.PricingService","msg":"slow downstream call","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":420.83},"request_id":"req-000007","order_id":"ord-2026-0317-007097","seq":7,"emitted_seq":7}
{"ts":"2026-03-17T09:14:34.950Z","level":"error","service":"inventory-api","version":"2.3.0","env":"staging","host":"node-b1","logger":"shop/inventory/reserve","msg":"insufficient stock for reservation","http":{"method":"POST","route":"/api/orders","status":409,"duration_ms":304.06},"request_id":"req-000008","order_id":"ord-2026-0317-008154","seq":8,"emitted_seq":8}
{"ts":"2026-03-17T09:14:34.650Z","level":"info","service":"notifier","version":"0.4.11","env":"staging","host":"node-c1","logger":"@example/shop-notifier","msg":"notification dispatched","http":{"method":"GET","route":"/healthz","status":200,"duration_ms":378.59},"request_id":"req-000009","order_id":"ord-2026-0317-009944","seq":9,"emitted_seq":9}
{"ts":"2026-03-17T09:14:35.450Z","level":"debug","service":"cart-api","version":"0.9.7","env":"staging","host":"node-a2","logger":"shop/cart/cache","msg":"cache lookup","http":{"method":"GET","route":"/api/cart","status":200,"duration_ms":208.57},"request_id":"req-000010","order_id":"ord-2026-0317-003333","seq":10,"emitted_seq":10}
{"ts":"2026-03-17T09:14:35.250Z","level":"debug","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a1","logger":"com.example.shop.checkout.PricingService","msg":"recomputed cart totals","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":294.74},"request_id":"req-000011","order_id":"ord-2026-0317-008341","seq":11,"emitted_seq":11}
{"ts":"2026-03-17T09:14:36.050Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-c1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":174.92},"request_id":"req-000012","order_id":"ord-2026-0317-003991","seq":12,"emitted_seq":12}
{"ts":"2026-03-17T09:14:35.750Z","level":"info","service":"cart-api","version":"0.9.7","env":"staging","host":"node-a2","logger":"shop/cart/handler","msg":"request completed","http":{"method":"GET","route":"/api/cart","status":200,"duration_ms":337.87},"request_id":"req-000013","order_id":"ord-2026-0317-008005","seq":13,"emitted_seq":13}
{"ts":"2026-03-17T09:14:36.650Z","level":"error","service":"payments-api","version":"3.1.4","env":"staging","host":"node-b2","logger":"shop.payments.authorize","msg":"upstream payment provider timed out","http":{"method":"POST","route":"/api/checkout","status":502,"duration_ms":264.14},"request_id":"req-000014","order_id":"ord-2026-0317-001647","seq":14,"emitted_seq":14}
{"ts":"2026-03-17T09:14:36.350Z","level":"info","service":"notifier","version":"0.4.11","env":"staging","host":"node-c1","logger":"@example/shop-notifier","msg":"notification dispatched","http":{"method":"GET","route":"/healthz","status":200,"duration_ms":123.63},"request_id":"req-000015","order_id":"ord-2026-0317-002614","seq":15,"emitted_seq":15}

Specifications

Lines
15
Inversions
7
Max Backtrack Ms
400
Has Emitted Seq
true
Monotonic By Field
emitted_seq
Seed
7411

Testing contract

Expected to pass
Scenario
Ingest the file into a time-ordered store and then read it back sorted by ts.
Expected result
All 15 records are retained and read back in timestamp order, with emitted_seq showing the 7 inversions rather than the late records being dropped as out-of-window.

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 — Out-of-Order Timestamps (jsonl)” is a deterministic Novus Examples fixture for Observability, Log parsing, Time-series data. 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: seed 7411. 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-out-of-order.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.