• Continue a trace from sentry-trace and baggage values. These values can be obtained from incoming request headers, or in the browser from <meta name="sentry-trace"> and <meta name="baggage"> HTML tags.

    Parameters

    • __namedParameters: {
          baggage: undefined | null | string | number | boolean | string[];
          sentryTrace: undefined | string;
      }

    Returns Partial<TransactionContext>

    Use the version of this function taking a callback as second parameter instead:

    Sentry.continueTrace(sentryTrace: '...', baggage: '...' }, () => {
    // ...
    })
  • Continue a trace from sentry-trace and baggage values. These values can be obtained from incoming request headers, or in the browser from <meta name="sentry-trace"> and <meta name="baggage"> HTML tags.

    Spans started with startSpan, startSpanManual and startInactiveSpan, within the callback will automatically be attached to the incoming trace.

    Deprecation notice: In the next major version of the SDK the provided callback will not receive a transaction context argument.

    Type Parameters

    • V

    Parameters

    • __namedParameters: {
          baggage: undefined | null | string | number | boolean | string[];
          sentryTrace: undefined | string;
      }
    • callback: (transactionContext: Partial<TransactionContext>) => V

    Returns V