Decision traces
Correlate TypeSafe inference, workflow choices, and observed outcomes.
Decision audit records are durable execution data. Cloud's Decisions view reads them even when the trace store is unavailable. The executor projects capture and result boundaries into swirls.decision.attempt spans; observed policy/review/action links emit swirls.decision.link; feedback recorded through the API emits swirls.decision.feedback. These are short internal spans, not spans held open while a human reviews a decision.
| Attribute | Meaning |
|---|---|
swirls.decision.contract.version | 1 for this decision telemetry contract |
swirls.decision.trace.id | Stable logical decision ID used by Cloud and client.decisions |
swirls.decision.attempt.id | Individual provider attempt; distinct across retries |
swirls.decision.definition.version | Hash of the captured deployed definition |
swirls.decision.status | Capture/result boundary: started, completed, failed, or cancelled |
swirls.decision.feedback.id | Durable feedback record ID |
swirls.decision.stage | Feedback kind: label, outcome, policy, action, or review |
swirls.decision.duration_ms | Locally measured attempt duration when known |
swirls.decision.error.class, .reason | Sanitized failure classification |
swirls.decision.content.policy | Capture policy applied to the attempt content |
gen_ai.response.id | TypeSafe request ID, when the provider supplies it |
http.response.status_code | Provider HTTP status, when a response is received |
The existing node span retains swirls.decision.name, requested/resolved model identities, and token usage. It also carries the decision/attempt IDs and provider response identity on successful completion. Sum tokens at the existing node layer, not across both node and attempt spans; attempt spans do not repeat token metric attributes.
Attempt swirls.node.meta contains policy-gated request/response content. Links and feedback use that same policy-gated key. The existing 32 KB content truncation and export redaction rules apply; full durable evidence remains available only through authorized decision reads. Operator decision.audit and decision.attempt logs contain correlation/status/operational metadata, not state, questions, distributions, or feedback bodies.
A dropped span does not mean an absent decision. An interrupted attempt may have reached TypeSafe without returning a durable response; its status is computed from the expired attempt lease in the decision API. No terminal span is guaranteed after a worker crash. Later feedback can appear in a different OTel trace and is correlated by the stable decision ID. The organization audit log receives a swirls.audit.decision.feedback_recorded summary for API feedback.
See Decisions for evidence, feedback, and calibration behavior.