diff --git a/MIGRATION.md b/MIGRATION.md index 4e3c606da191..b92bc63cb6e0 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -355,7 +355,7 @@ To make sure these integrations work properly you'll have to change how you Removed top-level exports: `tracingOrigins`, `MetricsAggregator`, `metricsAggregatorIntegration`, `Severity`, `Sentry.configureScope`, `Span`, `spanStatusfromHttpCode`, `makeMain`, `lastEventId`, `pushScope`, `popScope`, -`addGlobalEventProcessor`, `timestampWithMs`, `addExtensionMethods`, `addGlobalEventProcessor` +`addGlobalEventProcessor`, `timestampWithMs`, `addExtensionMethods`, `addGlobalEventProcessor`, `getActiveTransaction` Removed `@sentry/utils` exports: `timestampWithMs`, `addOrUpdateIntegration`, `tracingContextFromHeaders`, `walk` diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 66ea45739489..3108dc603d42 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -70,8 +70,6 @@ export { withActiveSpan, getSpanDescendants, setMeasurement, - // eslint-disable-next-line deprecation/deprecation - getActiveTransaction, getSpanStatusFromHttpCode, setHttpStatus, makeMultiplexedTransport, diff --git a/packages/core/src/tracing/index.ts b/packages/core/src/tracing/index.ts index e6f17a9f8911..c8e38bd9095a 100644 --- a/packages/core/src/tracing/index.ts +++ b/packages/core/src/tracing/index.ts @@ -3,8 +3,6 @@ export { startIdleSpan, TRACING_DEFAULTS } from './idleSpan'; export { SentrySpan } from './sentrySpan'; export { SentryNonRecordingSpan } from './sentryNonRecordingSpan'; export { Transaction } from './transaction'; -// eslint-disable-next-line deprecation/deprecation -export { getActiveTransaction } from './utils'; export { setHttpStatus, getSpanStatusFromHttpCode, diff --git a/packages/core/src/tracing/utils.ts b/packages/core/src/tracing/utils.ts index c22940508138..28ba9fb271eb 100644 --- a/packages/core/src/tracing/utils.ts +++ b/packages/core/src/tracing/utils.ts @@ -1,24 +1,7 @@ -import type { Span, Transaction } from '@sentry/types'; +import type { Span } from '@sentry/types'; import type { Scope } from '@sentry/types'; import { addNonEnumerableProperty } from '@sentry/utils'; -import type { Hub } from '../hub'; -import { getCurrentHub } from '../hub'; - -/** - * Grabs active transaction off scope. - * - * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead. - */ -export function getActiveTransaction(maybeHub?: Hub): T | undefined { - // eslint-disable-next-line deprecation/deprecation - const hub = maybeHub || getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation - const scope = hub.getScope(); - // eslint-disable-next-line deprecation/deprecation - return scope.getTransaction() as T | undefined; -} - // so it can be used in manual instrumentation without necessitating a hard dependency on @sentry/utils export { stripUrlQueryAndFragment } from '@sentry/utils'; diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 0184c14e730e..968dbdb4f805 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -31,8 +31,6 @@ export { createTransport, flush, // eslint-disable-next-line deprecation/deprecation - getActiveTransaction, - // eslint-disable-next-line deprecation/deprecation getCurrentHub, getClient, isInitialized, diff --git a/packages/tracing-internal/src/exports/index.ts b/packages/tracing-internal/src/exports/index.ts index 48106a40abf9..b3a3e3a4b4ed 100644 --- a/packages/tracing-internal/src/exports/index.ts +++ b/packages/tracing-internal/src/exports/index.ts @@ -1,6 +1,4 @@ export { - // eslint-disable-next-line deprecation/deprecation - getActiveTransaction, hasTracingEnabled, Transaction, } from '@sentry/core';