def Serve.kept
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport 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)