Service logs answer what happened in the process. LLM observations additionally connect prompts, outputs, model parameters, token usage, cost, quality scores, and nested retrieval or tool stages under one request identifier.
Source: AI observability diagram, Wikimedia Commons; CC BY 4.0, by Martinimarcello00.
Generate local traces and inspect one JSONL record:
uv run python -m observability_lab run-demo --count 10
head -n 1 data/generated/traces.jsonlIdentify the root request, retrieval span, generation span, usage fields, and quality score. Decide which fields are safe to export for your own application.
The root record correlates the request. spans separates retrieval latency from
generation latency. Token and cost fields belong to the generation stage.
Prompts and outputs can contain personal or confidential information, so a
production exporter needs masking and a retention policy before tracing is
enabled broadly.
