Aster TypeScript 0.3.893
    Preparing search index...

    Function withTraceContext

    Binding spans and the trace-context carrier; pino and winston helpers.

    • Run fn with ctx as the current trace context: binding spans started inside parent on it, logs carry its ids, outbound calls propagate it. ctx is a TraceContext or a traceparent string (with optional baggage). A malformed string runs fn unchanged.

      Type Parameters

      • T

      Parameters

      • ctx: string | TraceContext
      • fn: () => T
      • Optionalbaggage: Readonly<Record<string, string>>

      Returns T