def Serve.kept

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

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

3564# Take the context that extraction keeps, or start a root without one.
3565def Serve.kept(context: Maybe<&2, BaseContext>, received: Maybe<&2, IncomingContext>, reception: Reception,
3566  sampling: Sampling) -> ServicePlan:
3567  match context:
3568    case None{}:
3569      StartPlan{Generation.root(Serve.new_trace_sampled(sampling)), Started{}}
3570    case Some{+base}:
3571      Serve.usable(base, received, reception, sampling)

Uses (10)

Used by (1)