Skip to main content

TraceStatus

The set of allowed status values for a trace. Used to indicate the outcome of a traced operation.

Import

Type Definition

Values

The default status for a newly created trace is 'unknown'. You should update it to a terminal status ('success', 'failure', 'aborted', or 'cancelled') before calling trace.end().

Examples

Setting Status on a Trace

Handling Cancellation and Abort

Using Pending for Long-Running Operations

Conditional Status Logic


  • Trace — class that uses TraceStatus in trace.update()
  • Monitor — creates traces via monitor.logTrace()
  • Span — uses a similar SpanStatus type (which excludes 'pending')