def RemoteContext.flags
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
635# The trace flags that the context keeps, as a number from 0 to 3: bit 0 is
636# its sampled indication and bit 1 its trace ID's randomness assertion, the
637# known flags that it was received or built with. Reserved bits are never
638# among them. The Booleans stay the canonical form; the number is for an
639# exporter, such as one that writes OTLP's Span.flags field. Laws:
640# remote_flags and received_trace_flags.
641def RemoteContext.flags(context: RemoteContext) -> U32:
642 match context:
643 case RemoteContext{trace_id, span_id, sampled}:
644 Flags.known(sampled, TraceId.is_random(trace_id))
Uses (4)
Used by (0)
No other definition uses this definition.