botas-core
    Preparing search index...

    Function withActiveSpan

    • Start a named span, set it as the active span in context, and run the callback. Child spans created inside fn will be linked as children of this span. When @opentelemetry/api is not available, fn is called directly with a null span.

      Type Parameters

      • T

      Parameters

      • name: string
      • fn: (span: Span | null) => Promise<T>

      Returns Promise<T>