What to Log for LLM Traffic, and What Not To

Standard HTTP observability assumes that a 200 means success. For LLM traffic that assumption is wrong often enough to be dangerous: the most expensive failures return 200, take normal time, and produce output that is subtly unusable.

The signals that earn their storage

Per request, cheap to record and repeatedly useful:

Notice that none of these require storing prompt content.

What not to log

Prompts and completions are the highest-risk data your system handles, and they end up in the widest-access system you own if you are careless. Defaults worth adopting:

If content capture is genuinely needed — eval sets, abuse investigation — treat that store as a separate system with its own retention and access rules, and tell users it exists. That is the distinction our privacy policy draws between content and operational metadata, and it is the one auditors ask about.

Aggregates that catch silent degradation

Single requests prove nothing; distributions do. Three worth computing continuously, per model and per provider:

Alerts worth being woken by

Most LLM alerting is either absent or noise. A defensible starting set: error rate by provider over a short window; time-to-first-token at p95 against a rolling baseline rather than a fixed threshold; spend rate per key against its own recent norm; and parse-failure rate on structured routes. Four alerts, each mapping to an action.

Deliberately excluded: total latency (dominated by legitimate long generations) and total spend (arrives too late to act on — rate is the actionable form).

Where it belongs

All of this is per-request instrumentation on the path every model call already takes. Implemented per service, you get four partial versions and no shared view of provider health; implemented once at the gateway, you get one dataset that answers both "is the provider healthy" and "who spent this". That is the same argument as cost attribution, and it lands in the same place.

One request path, one dataset. Runix Gateway is in early access — tell us what you are building and we reply within one business day.