def Context.child_with

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

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

1532# A generated child of `parent` from a caller's source: the local context of
1533# its span plan (SpanPlan.child), a span ID that excludes the parent's, with
1534# the parent's trace ID and the sampled indication that `sampling` resolves.
1535# It reads at most 16 words. Laws: child_composed, child_tape, child_ends,
1536# child_exhaustion and generated_child.
1537def Context.child_with(~S: Type, ~read: S -> IO(S & Result<&1, &1, U32 & String, U32>), source: S,
1538  parent: Parent, sampling: Sampling) -> IO(S & Result<&2, &2, GenerationError, LocalContext>):
1539  SpanPlan.generate_with(~S, ~read, source, SpanPlan.child(parent, sampling))

Uses (11)

Used by (1)