All Questions
Evals And Observability hard

An agent handles a request with a planner LLM call, three tool calls (one sent to a queue worker that makes its own LLM call), and a final generation. In your tracing backend, the worker's LLM spans appear as separate root traces. As a result, per-request token cost and latency are under-reported. What is the right fix?

  1. A Propagate trace context, such as a W3C traceparent, in the queue message headers so the worker's spans attach to the originating trace.
  2. B Tag every LLM call with user ID and session ID, then join spans to requests in the warehouse by user and a timestamp window.
  3. C Raise trace sampling from 10% to 100% so the orphaned worker spans are always captured alongside their parent request spans.
  4. D Pull total token usage from the provider's billing export each day and divide it by request count to get an accurate per-request cost.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions