A support assistant takes too long to prepare a reply. Its model dashboard shows a successful call with the usual duration. The delay occurred while retrieving the policy, before generation began. To explain the wait, an operator needs the timeline surrounding that call.

Start with the operation the user requested, record its outcome, and work inward through its dependencies. The support assistant and diagnostic cases below are hypothetical. They describe an instrumentation design, not measurements from a running application.

Follow the operation the user asked for

In this example, the feature prepares a support reply based on the applicable policy and the customer’s eligibility. It returns a draft for review or explains why it could not prepare one. It never sends the reply.

This gives us an execution path to observe:

flowchart TD A[Prepare support reply] --> B[Authorize access and load ticket] B --> C[Retrieve applicable policy] C --> D{Required evidence available?} D -->|No| E[Return review required] D -->|Yes| F[Check eligibility through a tool] F --> G[Generate reply] G --> H[Validate reply] H --> I[Return draft or explicit failure]

Instrument each stage enough to explain its result and duration, and record the final application outcome. A trace that stops at generation misses a failed validation or an unsuccessful handoff to the caller.

Use a parent span for the feature operation and child spans for work that needs independent diagnosis. In .NET, spans are represented by Activity instances. Existing HTTP and dependency instrumentation provides part of the picture. Add application spans to capture decisions such as context selection and reply validation.

The Agent Framework observability article covers instrumentation setup. Here, the question is where the application needs visibility. Use the dependency map to identify those boundaries before choosing what to instrument.

Record what the application returned

Keep the set of application outcomes small. For this support feature, I would start with draft_ready, review_required, dependency_unavailable, cancelled, and internal_error. These are example application values, not OpenTelemetry conventions.

Record a controlled reason when an outcome needs explanation. review_required with insufficient_evidence tells an operator why generation stopped. A tool timeout follows a different path, even if both cases show the user a review message.

If reply validation rejects the generated response, the feature returns review_required with validation_failed and withholds the draft. An unexpected application failure returns internal_error. This distinguishes an output rejected by the feature’s checks from a failure to run those checks.

Transport status, dependency status, and application outcome answer different questions. An HTTP success can return a request for manual review. A model response can complete while the application rejects its output. Conversely, one model attempt can fail before a later attempt produces an acceptable draft.

Set span error status according to the operation’s contract and applicable instrumentation conventions. Keep the application outcome explicit so dashboards do not have to infer it from exceptions or HTTP codes. Count expected abstentions separately from broken dependencies.

Passing validation tells you which checks accepted the reply. Whether those checks can catch an incorrect answer is a separate evaluation question.

Choose signals from diagnostic questions

I would use this table to decide what to record:

Diagnostic questionEvidence to collect
Where did the user wait?Caller duration, feature duration, dependency spans, time to usable output
Why did generation stop?Application outcome, controlled reason, last completed stage
Did recovery add work?Logical generation span, attempt spans, attempt numbers, backoff duration
What context reached the model?Retrieved and admitted counts, context size, governed references to admitted evidence
What did the tool establish?Registered tool name, duration, controlled result, downstream failure class
What behavior was deployed?Build identity, prompt version, model route, retrieval configuration version

A trace explains one execution. Metrics show whether the same problem affects many requests, while structured logs can explain decisions such as rejecting a reply. With the current trace and span identifiers in those log records, an operator can follow the decision back to the execution. That connection depends on the logging configuration exporting the identifiers.

A feature name and fixed outcome set give metrics bounded dimensions that operators can group by. Operation IDs and ticket IDs can create unbounded metric cardinality. SDK cardinality limits may fold excess attribute combinations into overflow aggregation, losing the per-request distinction those identifiers were meant to provide. Approved identifiers belong in traces or logs, with access controls appropriate to the records they can identify.

Standard semantic conventions cover part of this schema. Application fields need their own definitions. For model telemetry, compare the fields your instrumentation actually emits with the OpenTelemetry GenAI semantic conventions before building dashboards. Build identity in operational telemetry lets an operator identify the artifact that handled each request during a mixed rollout.

For this feature, a small application schema could look like this. All names below are application-defined examples, not OpenTelemetry conventions:

SignalExampleMeaning
Feature spansupport.prepare_replyOne execution of the support-reply feature
Span attributeapp.outcome = review_requiredThe result returned by that execution
Span attributeapp.reason = insufficient_evidenceA controlled explanation of the outcome
Counterapp.support.executionsExecutions that ended, grouped by bounded app.outcome values
Histogramapp.support.execution.durationElapsed seconds for those executions, grouped by the same outcome values

Each feature execution contributes one counter increment when it ends and one duration measurement over the same boundary. Model retries stay inside that execution. They do not increment the feature counter, while a separate measurement tracks executions still in progress. The outcome and reason fields use fixed application values, so exception messages or model-generated explanations cannot become new metric dimensions.

Work through three incidents

Retrieval dominated the request latency

Suppose the user reports a slow reply, but the model span looks ordinary. After loading the ticket, the parent operation’s timeline might show this pattern. The bar widths are illustrative, not measured durations:

Time progresses to the right
policy.retrieve      [========================]
eligibility.check                             [==]
reply.generate                                    [====]
reply.validate                                          [=]

Most of the wait occurs before generation begins. Retrieval is the first place to investigate.

A retrieval span narrows the search. Its child spans may distinguish embedding generation from the search request. If the application waits for capacity before either begins, measure that wait too. Otherwise, the trace leaves the operator guessing about the gap.

This example runs the stages in sequence. When work runs in parallel, overlapping child spans can add up to more than the parent’s elapsed time. Follow the critical path to understand the caller’s wait. A long search span narrows the investigation, but the search service and any queue or connection wait it exposes are still needed to explain the cause.

A retry recovered from a model failure

A recovered model failure might produce a trace like this. The names and outcomes are illustrative, not exporter output:

support.prepare_reply           outcome=draft_ready
├── policy.retrieve             outcome=completed
├── eligibility.check           outcome=eligible
├── reply.generate              outcome=completed, attempts=2
│   ├── model.attempt            attempt=1, outcome=dependency_error
│   ├── retry.backoff
│   └── model.attempt            attempt=2, outcome=completed
└── reply.validate              outcome=accepted

The final model call explains only part of the generation time. The failed attempt and backoff account for work that a dashboard of successful calls would miss.

A wrapper around a single SDK method may include several internal attempts without showing them individually. Before relying on this view, verify which retries your SDK instrumentation exposes. Where attempt data is unavailable, that limitation should remain explicit.

Token usage may be incomplete for failed attempts. Missing usage remains unknown. If an estimate uses only the successful response, label it as partial. The middleware-ordering article explains how instrumentation placement changes what a wrapper observes.

Retrieval returned results, but the evidence was insufficient

The search succeeds and returns passages. The application then checks whether it can use them for this ticket. Its decision sequence looks like this:

Search completed
  → No passages met applicability rules
  → Generation skipped
  → review_required / insufficient_evidence

The context-selection decision explains why a successful search led to manual review. A nonzero hit count alone leaves that decision unexplained.

The rule version and a controlled rejection reason make deterministic eligibility decisions easier to investigate. Passing those checks still cannot prove semantic relevance. A later quality investigation may require authorized access to the selected passages and the policy that applied to the case.

Here, there is a reason for the missing model span: the application chose to stop. Check that decision before investigating the instrumentation. If manual review requests increase after a retrieval change, compare the affected cases before attributing the increase to that change.

Keep identity when work continues later

A trace ID identifies a trace, while an application operation ID identifies the logical task. They often belong together, but an approval workflow can carry the same task across several executions.

Suppose a later version of the feature lets an operator approve saving the prepared draft. Generation, the review decision, and the worker that saves the draft can each have its own trace. A durable relationship among the operation, the exact draft revision, the approval record, and the execution attempt lets an operator follow the task across those executions.

Propagate trace context across supported service and queue boundaries. If delayed work is modeled as a separate trace, a span link can preserve its causal relationship to the earlier execution when the earlier span context is available. Verify propagation at the actual boundary, especially when custom messages or external services are involved.

If a reviewer takes an afternoon to decide, that is review wait time. Measuring it separately keeps it out of active execution latency. Persisted workflow state lets work resume with its own execution budget, as described in Human Approval as a System Boundary.

Trace retention and sampling can remove diagnostic records. Durable operation and approval records must still establish what was authorized and executed.

Connect quality evidence to the response it judged

A later evaluation may find that the accepted reply omitted a policy exception. To investigate that finding, it needs a link to the exact response revision it assessed, along with the model and prompt versions and evaluation definition. A conversation ID alone is too broad when a conversation contains several replies. An evaluator failure needs an unscored result with its reason, so it cannot be mistaken for a quality judgment.

Production evaluation can run after the response, as described in Run production evaluations outside the user response path. A later score can guide an investigation or release decision. Any check that determines whether the current answer may be shown must run before that handoff.

Choose quality criteria using What Should You Actually Evaluate?. Keep retained content and diagnostic access within the policy described in Privacy Boundaries for AI Telemetry. Correlation does not require copying prompts and tool payloads into every span.

Check what the telemetry leaves out

A failure-rate chart built from retained traces inherits the sampling policy. When that policy favors errors or slow requests, their frequency in the retained set can be misleading. Outcome counters collected independently of trace sampling give a separate view of how executions ended, while admission and active-execution counts show how much work remains unresolved.

A latency chart also needs a defined population. If it excludes failures and cancellations, show their distributions separately. The caller’s wait and backend completion need separate measurements when work can continue after a timeout or disconnect. Use an unknown cancellation cause whenever the application cannot establish why cancellation occurred.

Missing spans also need investigation. Sampling, exporter loss, missing source registration, and broken propagation can all produce an incomplete view. Check collection health before concluding that a step never ran.

When to use this approach

Use this operation-level view when retrieval, tools, retries, or deferred work can affect what the user receives. Start with one feature. Define its outcomes, identify the stages that could explain an incident, and verify that you can follow a request across them.

For the support assistant, start with a concrete question: can an operator use the recorded signals to distinguish a slow search, a recovered model failure, and a deliberate request for manual review?

When not to add the full workflow view

A small text transformation with a single model call may need only caller timing, model telemetry, and an explicit application result. Add spans when they answer a diagnostic question. A span around every helper method adds detail without necessarily making an incident easier to explain.

Sources