Skip to content
Novus Examples
jsonl8.6 KB

Structured Log — Clock Skew Across Three Hosts (jsonl)

Three hosts writing to one stream with disagreeing clocks: one 45 seconds behind and one six hours ahead because NTP is unreachable. Interleaved by host, so a naive tail shows events from the future and a retention window silently drops the past.

Preview — first 25 linesjsonl
{"ts":"2026-03-17T09:14:33.016Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":7.0},"request_id":"req-000001","order_id":"ord-2026-0317-001565","seq":1,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:48.185Z","level":"info","service":"notifier","version":"0.4.11","env":"staging","host":"node-a2","logger":"@example/shop-notifier","msg":"notification dispatched","http":{"method":"GET","route":"/healthz","status":200,"duration_ms":246.54},"request_id":"req-000002","order_id":"ord-2026-0317-001441","seq":2,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:33.503Z","level":"info","service":"notifier","version":"0.4.11","env":"staging","host":"node-b1","logger":"@example/shop-notifier","msg":"notification dispatched","http":{"method":"GET","route":"/healthz","status":200,"duration_ms":478.67},"request_id":"req-000003","order_id":"ord-2026-0317-008709","seq":3,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:33.601Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":418.22},"request_id":"req-000004","order_id":"ord-2026-0317-006081","seq":4,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:48.778Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a2","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":166.57},"request_id":"req-000005","order_id":"ord-2026-0317-001827","seq":5,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:33.928Z","level":"warn","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-b1","logger":"com.example.shop.checkout.PricingService","msg":"slow downstream call","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":128.9},"request_id":"req-000006","order_id":"ord-2026-0317-009768","seq":6,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:34.073Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":166.29},"request_id":"req-000007","order_id":"ord-2026-0317-004529","seq":7,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:49.361Z","level":"debug","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a2","logger":"com.example.shop.checkout.PricingService","msg":"recomputed cart totals","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":164.24},"request_id":"req-000008","order_id":"ord-2026-0317-002127","seq":8,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:34.705Z","level":"info","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-b1","logger":"com.example.shop.checkout.OrderController","msg":"request completed","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":258.67},"request_id":"req-000009","order_id":"ord-2026-0317-003035","seq":9,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:34.962Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":386.2},"request_id":"req-000010","order_id":"ord-2026-0317-004474","seq":10,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:50.310Z","level":"error","service":"payments-api","version":"3.1.4","env":"staging","host":"node-a2","logger":"shop.payments.authorize","msg":"upstream payment provider timed out","http":{"method":"POST","route":"/api/checkout","status":502,"duration_ms":472.46},"request_id":"req-000011","order_id":"ord-2026-0317-002548","seq":11,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:35.518Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-b1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":72.4},"request_id":"req-000012","order_id":"ord-2026-0317-003642","seq":12,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:35.613Z","level":"error","service":"inventory-api","version":"2.3.0","env":"staging","host":"node-a1","logger":"shop/inventory/reserve","msg":"insufficient stock for reservation","http":{"method":"POST","route":"/api/orders","status":409,"duration_ms":437.01},"request_id":"req-000013","order_id":"ord-2026-0317-003855","seq":13,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:50.692Z","level":"info","service":"checkout-api","version":"1.14.2","env":"staging","host":"node-a2","logger":"com.example.shop.checkout.OrderController","msg":"request completed","http":{"method":"POST","route":"/api/checkout","status":201,"duration_ms":449.86},"request_id":"req-000014","order_id":"ord-2026-0317-004319","seq":14,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:36.032Z","level":"warn","service":"inventory-api","version":"2.3.0","env":"staging","host":"node-b1","logger":"shop/inventory/reserve","msg":"reservation retried after conflict","http":{"method":"POST","route":"/api/orders","status":200,"duration_ms":138.83},"request_id":"req-000015","order_id":"ord-2026-0317-006364","seq":15,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:36.223Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":345.28},"request_id":"req-000016","order_id":"ord-2026-0317-002875","seq":16,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:51.304Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a2","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":246.2},"request_id":"req-000017","order_id":"ord-2026-0317-005246","seq":17,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:36.500Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-b1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":228.7},"request_id":"req-000018","order_id":"ord-2026-0317-006173","seq":18,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:36.734Z","level":"error","service":"inventory-api","version":"2.3.0","env":"staging","host":"node-a1","logger":"shop/inventory/reserve","msg":"insufficient stock for reservation","http":{"method":"POST","route":"/api/orders","status":409,"duration_ms":125.92},"request_id":"req-000019","order_id":"ord-2026-0317-009035","seq":19,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:51.827Z","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":352.63},"request_id":"req-000020","order_id":"ord-2026-0317-006705","seq":20,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:36.923Z","level":"error","service":"payments-api","version":"3.1.4","env":"staging","host":"node-b1","logger":"shop.payments.authorize","msg":"upstream payment provider timed out","http":{"method":"POST","route":"/api/checkout","status":502,"duration_ms":432.57},"request_id":"req-000021","order_id":"ord-2026-0317-007491","seq":21,"clock_source":"local (ntp unreachable)"}
{"ts":"2026-03-17T09:14:37.157Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a1","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":124.6},"request_id":"req-000022","order_id":"ord-2026-0317-001265","seq":22,"clock_source":"ntp"}
{"ts":"2026-03-17T09:13:52.259Z","level":"info","service":"catalog","version":"0.0.1","env":"staging","host":"node-a2","logger":"shop/catalog/handler","msg":"request completed","http":{"method":"GET","route":"/api/catalog","status":200,"duration_ms":471.76},"request_id":"req-000023","order_id":"ord-2026-0317-005478","seq":23,"clock_source":"ntp"}
{"ts":"2026-03-17T15:14:37.401Z","level":"error","service":"payments-api","version":"3.1.4","env":"staging","host":"node-b1","logger":"shop.payments.authorize","msg":"upstream payment provider timed out","http":{"method":"POST","route":"/api/checkout","status":502,"duration_ms":42.78},"request_id":"req-000024","order_id":"ord-2026-0317-003493","seq":24,"clock_source":"local (ntp unreachable)"}

Specifications

Lines
24
Hosts
3
Skew Seconds Node A2
-45
Skew Hours Node B1
6
Future Timestamps
8
Clock Source Recorded
true
Seed
7411

Testing contract

Expected to recover
Scenario
Ingest all 24 records and apply a one-hour ingestion window.
Expected result
The eight node-b1 records six hours ahead are quarantined or clamped rather than silently accepted, and the 45-second-behind host still lands inside the 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 — Clock Skew Across Three Hosts (jsonl)” is a deterministic Novus Examples fixture for Observability, Log parsing, 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: 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-clock-skew.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.