Question 680
A retrieval step takes four seconds but logs record only total response duration. How should tracing be improved?
Explanation
Correct Answer
Stage-level timing identifies the slow component instead of attributing all latency to the model service.
Incorrect Answers
Capture appropriately redacted retrieval query, selected documents, and model-generation spans. This is useful for the distinct issue: A RAG response hallucinates a citation, but logs contain only the generated answer and not retrieved chunks. The relevant technical rationale or evidence for that issue is: RAG tracing reveals whether failure arose in retrieval or unsupported answer generation. Here the reported issue is: A retrieval step takes four seconds but logs record only total response duration. The relevant response is: Instrument retrieval and generation as separate timed spans. The first result cannot verify this different correction: Stage-level timing identifies the slow component instead of attributing all latency to the model service.
Configure appropriate trace sampling and retention while keeping critical failures fully observable. It addresses another case: An application generates huge trace volumes and exceeds monitoring budgets, prompting developers to disable all tracing. For that case, the distinguishing justification or acceptance check is: Selective sampling controls volume without eliminating incident evidence for high-severity application errors. The present case instead states: A retrieval step takes four seconds but logs record only total response duration. It calls for Instrument retrieval and generation as separate timed spans. Showing success for the other case would not establish: Stage-level timing identifies the slow component instead of attributing all latency to the model service.
The alternative, Apply sensitive-data redaction and least-privilege access to traces, belongs to a different technical condition: A tracing agent captures raw customer prompts including social security numbers into an unrestricted monitoring dashboard. There the source-specific mechanism or proof is: Observability must preserve useful diagnostics without turning logs into an uncontrolled store of private data. The condition asked about here is: A retrieval step takes four seconds but logs record only total response duration. A suitable correction is Instrument retrieval and generation as separate timed spans; the targeted justification or result is: Stage-level timing identifies the slow component instead of attributing all latency to the model service.