Function extractTraceparentData

The extractTraceparentData function and TRACEPARENT_REGEXP constant used to be declared in this file. It was later moved into @sentry/utils as part of a move to remove @sentry/tracing dependencies from @sentry/node (extractTraceparentData is the only tracing function used by @sentry/node).

These exports are kept here for backwards compatability's sake.

See https://github.com/getsentry/sentry-javascript/issues/4642 for more details.

Import this function from @sentry/utils instead

  • Extract transaction context data from a sentry-trace header.

    Parameters

    • Optionaltraceparent: string

      Traceparent string

    Returns TraceparentData | undefined

    Object containing data from the header, or undefined if traceparent string is malformed