Skip to content
Novus Examples
jsonl4.1 KB

Structured Log — Truncated Final Record, Intentionally Corrupt (jsonl)

Twelve complete JSON records followed by a thirteenth cut off after 96 bytes with no trailing newline, exactly as a container log looks when the process is killed mid-write. Intentionally corrupt and small: a tailer must hold the partial line for a continuation rather than emit or discard it.

Preview — first 13 linesjsonl
{"ts":"2026-03-17T09:14:32.850Z","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":179.36},"request_id":"req-000001","order_id":"ord-2026-0317-005817","seq":1}
{"ts":"2026-03-17T09:14:33.270Z","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":119.32},"request_id":"req-000002","order_id":"ord-2026-0317-003631","seq":2}
{"ts":"2026-03-17T09:14:33.690Z","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":243.49},"request_id":"req-000003","order_id":"ord-2026-0317-003082","seq":3}
{"ts":"2026-03-17T09:14:34.110Z","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":223.13},"request_id":"req-000004","order_id":"ord-2026-0317-009917","seq":4}
{"ts":"2026-03-17T09:14:34.530Z","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":406.51},"request_id":"req-000005","order_id":"ord-2026-0317-001382","seq":5}
{"ts":"2026-03-17T09:14:34.950Z","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":342.47},"request_id":"req-000006","order_id":"ord-2026-0317-004997","seq":6}
{"ts":"2026-03-17T09:14:35.370Z","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":186.37},"request_id":"req-000007","order_id":"ord-2026-0317-008337","seq":7}
{"ts":"2026-03-17T09:14:35.790Z","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":286.13},"request_id":"req-000008","order_id":"ord-2026-0317-008625","seq":8}
{"ts":"2026-03-17T09:14:36.210Z","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":306.24},"request_id":"req-000009","order_id":"ord-2026-0317-005523","seq":9}
{"ts":"2026-03-17T09:14:36.630Z","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":289.1},"request_id":"req-000010","order_id":"ord-2026-0317-001324","seq":10}
{"ts":"2026-03-17T09:14:37.050Z","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":32.38},"request_id":"req-000011","order_id":"ord-2026-0317-003621","seq":11}
{"ts":"2026-03-17T09:14:37.470Z","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":20.2},"request_id":"req-000012","order_id":"ord-2026-0317-002574","seq":12}
{"ts":"2026-03-17T09:14:37.890Z","level":"info","service":"catalog","version":"0.0.1","env":"sta

Specifications

Complete Lines
12
Truncated Lines
1
Intentionally Corrupt
true
No Trailing Newline
true
Truncated At Bytes
96
Cause
container killed mid-write

Testing contract

Expected to recover
Scenario
Tail the file and forward complete records only.
Expected result
12 records are forwarded, the incomplete thirteenth line is buffered rather than parsed or dropped, and re-reading the file does not duplicate the first twelve.

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 — Truncated Final Record, Intentionally Corrupt (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: intentionally corrupt. 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-truncated-tail.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.