Overview
Curated: · Written: · Reviewed:
LLM Observability & Monitoring
In one line
Monitoring and tracing for LLM and agent systems, so you can tell whether an output was correct, grounded and worth its cost, on top of the usual latency and error telemetry. Reach for it whenever a 200 response can still be a failed task.
Key definitions
- Operational plane: availability, latency, rate limits and budget, measured with classic golden signals.
- Behavior plane: whether outputs are correct, grounded and useful, measured with outcome SLIs, judges and implicit signals.
- Outcome SLI: a user-visible success such as a verified refund or a schema-valid final. The denominator is tasks, not calls.
- Cost per successful task: total spend divided by tasks with a verified outcome.
- Exemplar: a sampled link from an aggregate metric to a protected trace.
- Tail sampling: deciding to keep a trace after it completes, so errors and slow traces survive.
Formulas and complexity
A 99.9% SLO over 30 days leaves an error budget of 0.001 x 43,200 min = 43.2 min.
How it works
- Each model call is a span with bounded, versioned attributes: model and resolved snapshot, prompt template ID and version, decoding parameters, token counts, finish reason, and time to first token.
- An agent run is a tree under one trace ID. Each LLM call, tool call and retrieval is a child span.
- Async work needs the trace context inside the message. A traceparent header on the enqueue HTTP call only links the enqueue request.
- Judges and implicit signals score sampled outcomes. Alerts fire on outcome SLO burn, not on token counts.
When to use and when not to
| Choice | Use when | Avoid when |
|---|---|---|
| Head sampling | Volume is high and cost dominates | You must keep every error or slow trace |
| Tail sampling | Errors and slow traces must survive | Collector memory and buffering delay are unacceptable |
| Judge on a sample | No ground truth exists and you can calibrate the judge | The judge is uncalibrated |
| Implicit signals (regenerate, edits) | Fast, free, continuous signal | Used alone as ground truth |
| Human review queue | New task types and low-confidence cases | Routine volume |
Traps interviewers probe
- Counting HTTP 200 as success. Fix: define the SLI on verified task outcomes and count tasks, not calls. A 10,000-call day can hide 400 stuck tasks.
- Putting user IDs, prompts or raw exception strings in metric labels. Fix: use bounded labels (model, route, status, cohort). Link to protected traces with exemplars. Each new label value creates a new series.
- Treating the judge score as ground truth. Fix: calibrate against expert labels, report agreement and uncertainty, and version the judge so a score drop is not blamed on the product by mistake.
- Head-sampling away failures and minority cohorts. Fix: tail-sample errors and slow traces, record the sampling probability on each trace, and keep audit events on a separate unsampled path.
- Dating the model by its alias. Fix: log the resolved snapshot and system fingerprint. A provider can change behavior while the alias reads the same name.
Interview tips
Opening: A 200 is not a success. I would measure verified task outcomes first, then use component signals to explain them.
Follow-ups to expect:
- How do you detect a silent provider update? Frozen sentinel evals, pinned versions, and change-point alerts on fingerprint and score.
- How do you evaluate the evaluator? Expert-labeled calibration sets, agreement rates per slice, and versioned judges.
- How do you alert without paging on noise? Burn rate on outcome SLOs, tickets for drift trends.
- How do you sample without biasing denominators? Record the probability, keep audit paths unsampled, and reweight.
30-second outline:
- Name the outcome SLI and its denominator.
- Name the join: trace, prompt version, model snapshot, corpus version, tool version.
- Sampling: tail-sample errors and slow traces, keep audit events unsampled.
- Quality: a calibrated judge on a sample, plus implicit signals.
- Alerting: burn rate on the outcome SLO, tickets for drift. Use version tags to decide between rollback and re-evaluation.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.