In this article
A policy outcome needs its own field; an unconditional Ok status can suppress a real trace error.
The diagnostic situation
A policy service correctly rejects a request, while another request fails because the policy dependency is unavailable. Both produce a rejection-shaped response. A tracing wrapper classifies every rejection as Error, or sets Ok after formatting any response. Either shortcut loses the distinction between an expected decision and a malfunction of the decision path.
Why the observation changes meaning
OpenTelemetry span status has Unset, Ok and Error meanings, not an application-specific approval vocabulary. The API specifies that Ok overrides Error, so a final unconditional success assignment can hide an earlier failure. Transport conventions and operation scope still apply. A normal refusal is not universally successful or erroneous across every HTTP, RPC and application span.
Define the instrumentation contract
Define separate fields for the operation outcome, policy decision and evidence completeness. Document the semantic convention governing each span kind. State whether the span measures policy evaluation, response delivery or the entire user operation. Do not reuse its status as a safety verdict or as proof that generated content is correct. Those are different decisions with different evidence.
A bounded verification procedure
Construct a controlled allow decision, an expected deny decision and a dependency failure. Trace the exact wrapper order through response construction and exception handling. Inspect status at the final exporter, not only immediately after the failing call. Add a fixture that attempts to set Ok after Error so the test exposes accidental overriding behavior in the selected SDK.
Evidence required for acceptance
Acceptance requires a classification table connecting each fixture to span scope, application outcome and final exported status. Preserve policy and instrumentation revisions plus the exception handling path. Check that an expected deny remains distinguishable from an unavailable evaluator even if their client-facing envelopes intentionally resemble each other. Inspect any alert query that currently counts status alone as a business failure.
Failure cases and limits
Different layers may legitimately disagree: a successfully delivered error response can accompany a failed upstream evaluation. Keep those observations attached to their operations rather than forcing every span into one identical status. This protocol does not prescribe a universal HTTP status for refusals or validate a policy taxonomy. Its goal is to prevent instrumentation precedence from erasing useful distinctions.
Primary references and related reading
A policy outcome needs its own field; an unconditional Ok status can suppress a real trace error. OpenTelemetry tracing API specification; OpenTelemetry logs data model.
The proposed investigation of span status policy outcome is not an executed deployment benchmark. Related reading: A successful stream for an SLO: define the event and denominator; Terminal request records: reconcile stream, usage and logs.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.