success, failure, or unknown) and infers it automatically from the HTTP status code or a captured error. For custom or non-HTTP work such as background jobs, queue consumers, database, or RPC calls, set the outcome explicitly. An explicitly set outcome overrides the automatic inference.
Compatibility
Requires Python agent version 2.3.1 or higher.Set transaction outcome
Set span outcome
On a span, use theset_success() and set_failure() helpers on the span object returned by capture_span.