Observability

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.

AttributeMeaning
swirls.decision.contract.version1 for this decision telemetry contract
swirls.decision.trace.idStable logical decision ID used by Cloud and client.decisions
swirls.decision.attempt.idIndividual provider attempt; distinct across retries
swirls.decision.definition.versionHash of the captured deployed definition
swirls.decision.statusCapture/result boundary: started, completed, failed, or cancelled
swirls.decision.feedback.idDurable feedback record ID
swirls.decision.stageFeedback kind: label, outcome, policy, action, or review
swirls.decision.duration_msLocally measured attempt duration when known
swirls.decision.error.class, .reasonSanitized failure classification
swirls.decision.content.policyCapture policy applied to the attempt content
gen_ai.response.idTypeSafe request ID, when the provider supplies it
http.response.status_codeProvider 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.