TraceStatus
Allowed status values for a Trace.Overview
TraceStatus defines the lifecycle states a trace can be in. Every trace has a status that indicates whether it completed, failed, or is still in progress. The default status is "unknown".
Import
Type Definition
TraceStatus is a str literal with the following allowed values:
Unlike SpanStatus,
TraceStatus includes the "pending" value because traces can represent long-running operations whose outcome is not yet known.Usage
Setting status on a new trace
Updating status after completion
Conditional status based on outcome
Related
- Trace — the class that uses
TraceStatus - SpanStatus — the equivalent status type for spans (excludes
"pending") - Monitor — creates traces via
log_trace()