TraceProcessors
JudgmentSpanProcessor
Span processor that manages span lifecycle, state, and batched export.
Extends the OpenTelemetry BatchSpanProcessor with per-span mutable
state (counters, lists), partial-span emission for streaming updates,
and automatic baggage propagation.
Created automatically by Tracer.init(). Use it directly only when
building a custom tracing pipeline.
Attributes
Prop
Type
state_set()
Store a value in the mutable state for a span.
def state_set(span_context, key, value) -> None:Parameters
Prop
Type
Returns
None
state_get()
Retrieve a value from the mutable state for a span.
def state_get(span_context, key, default=None) -> Any:Parameters
Prop
Type
Returns
Any
state_incr()
Atomically increment a counter. Returns the value before increment.
def state_incr(span_context, key) -> int:Parameters
Prop
Type
Returns
int
state_append()
Atomically append to a list. Returns the new list.
def state_append(span_context, key, item) -> list[Any]:Parameters
Prop
Type
Returns
list[Any]
emit_partial()
Export the current span's in-progress state for streaming updates.
def emit_partial() -> None:Returns
None
on_start()
def on_start(span, parent_context=None) -> None:Parameters
Prop
Type
Returns
None
on_end()
def on_end(span) -> None:Parameters
Prop
Type
Returns
None