UNPKG

@sentry/core

Version:
28 lines (24 loc) 1.09 kB
import { extractTraceparentData as extractTraceparentData$1 } from '@sentry/utils'; export { stripUrlQueryAndFragment } from '@sentry/utils'; import { getCurrentHub } from '../hub.js'; /** Grabs active transaction off scope, if any */ function getActiveTransaction(maybeHub) { const hub = maybeHub || getCurrentHub(); const scope = hub.getScope(); return scope.getTransaction() ; } /** * 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. * * @deprecated Import this function from `@sentry/utils` instead */ const extractTraceparentData = extractTraceparentData$1; export { extractTraceparentData, getActiveTransaction }; //# sourceMappingURL=utils.js.map