LLM observability: connect logs, traces, and outcomes
Trace retrieval, generation, validation, and retries without confusing model completion with application success.
Connect LLM events to retrieval, retries, validation, and delivery so a single request tells a coherent story.
{
"schema_version": "1.0",
"timestamp": "2026-09-21T09:41:02.184Z",
"severity": "INFO",
"event_id": "evt_demo_002",
"event_name": "generation.completed",
"service": "assistant-worker",
"attributes": {
"workflow_id": "wf_demo_042",
"model": "example-model",
"config_version": "prompt-v3",
"outcome": "completed",
"duration_ms": 842
}
}Distinguish model time from retrieval, queueing, and application work.
Keep failed attempts visible even when a later attempt succeeds.
Attach validation results without calling them guarantees of truth.
Use supported context propagation across participating services. Where a dependency does not expose tracing context, preserve an approved application reference and the observed provider request reference. Missing instrumentation should appear as a gap, not as zero work.
These fields illustrate a design pattern. Map them deliberately to your own schema, source, and destination.
| Field | What it means |
|---|---|
trace_id | An approved correlation reference from your tracing system. |
span_id | The operation within a trace, when instrumentation provides it. |
duration_ms | A duration with an explicit measurement boundary. |
attempt | The individual execution attempt within the workflow. |
A trace explains observed operations. It does not establish that a generated answer is correct or that every dependency participated in collection.
Technical reference: W3C Trace Context . Verify the version and settings used by your own implementation.
Trace retrieval, generation, validation, and retries without confusing model completion with application success.
Instrument AI workflows with useful metadata, configuration versions, and clear outcomes—not entire conversations.
Keep reported usage separate from estimates, handle retries, and make cost calculations explainable.
Start with a clear schema. Keep the context that matters.