@microsoft/opentelemetry
    Preparing search index...

    Function runWithExportToken

    • Run a function within a Context that carries the per-request export token. This keeps the token only in OTel Context (ALS), never in any registry.

      The token can be updated later via updateExportToken() before the trace is flushed — useful when the callback is long-running and the original token may expire before export.

      Type Parameters

      • T

      Parameters

      • token: string
      • fn: () => T

      Returns T