type TraceParentV00

bend-trace-context@0.2.0.0 · trace_context.bend:170

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base
import bend-trace-context@0.2.0.0/src/digits.bend as Digits

170# A strict traceparent v00 value (W3C 3.2.2): a trace ID of 32 digits and a
171# parent ID of 16 digits, each with a proof that it is not all zero, and a flag
172# byte of two digits. Length and alphabet are structural: a value with a wrong
173# length or a non-hexadecimal digit cannot be built. All eight flag bits are
174# kept, including the reserved ones, so the codec is exact.
175type TraceParentV00 is Data:
176  TraceParentV00{
177    trace_id: Digits.NonZero<32n>,
178    parent_id: Digits.NonZero<16n>,
179    flags: Digits.Digits(2n)
180  }

Uses (2)

Used by (20)