def TracePlan.generate_with
bend-trace-context@0.2.0.0 · trace_context.bend:1507
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base
1507
1508
1509
1510
1511def TracePlan.generate_with(~S: Type, ~read: S -> IO(S & Result<&1, &1, U32 & String, U32>), source: S,
1512 plan: TracePlan) -> IO(S & Result<&2, &2, GenerationError, LocalContext>):
1513 match plan:
1514 case TracePlan{excluded, sampled}:
1515 IO.bind(S & Result<&2, &2, GenerationError, TraceId>, S & Result<&2, &2, GenerationError, LocalContext>,
1516 TraceId.generate_with(~S, ~read, source, excluded), outcome => Draw.root_span_with(~S, ~read, sampled, outcome))