def Context.inject

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

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

3272# Write an outgoing context into a carrier as a participant: the context
3273# fields of the carrier are replaced by the emitted traceparent, version 00
3274# with only the sampled and random-trace-id flags, and the emitted
3275# tracestate, truncated to the output budget of `limits` and left out when
3276# empty. The other fields keep their order, and injecting the same context
3277# into the carrier written gives that carrier again. A receiver that extracts
3278# the carrier with the same limits continues the injected operation with the
3279# truncated state. Laws: inject_carrier, inject_dropped, inject_idempotent and
3280# inject_extracted.
3281def Context.inject(limits: Limits, outgoing: OutgoingContext, carrier: List<&2, Header>) -> Injection:
3282  Injection.of(carrier, OutgoingContext.emit(limits, outgoing))

Uses (7)

Used by (1)