diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-express-legacy/app/entry.server.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-express-legacy/app/entry.server.tsx index 4e1e9e0ba537..a387f32ee7a6 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-express-legacy/app/entry.server.tsx +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-express-legacy/app/entry.server.tsx @@ -13,7 +13,7 @@ installGlobals(); const ABORT_DELAY = 5_000; -export const handleError = Sentry.wrapRemixHandleError; +export const handleError = Sentry.sentryHandleError; export default function handleRequest( request: Request, diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/app/entry.server.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/app/entry.server.tsx index a38636a8745d..eff2857fb4b1 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/app/entry.server.tsx +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/app/entry.server.tsx @@ -13,7 +13,7 @@ installGlobals(); const ABORT_DELAY = 5_000; -export const handleError = Sentry.wrapRemixHandleError; +export const handleError = Sentry.sentryHandleError; export default function handleRequest( request: Request, diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-express/app/entry.server.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-express/app/entry.server.tsx index 4e1e9e0ba537..a387f32ee7a6 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-express/app/entry.server.tsx +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-express/app/entry.server.tsx @@ -13,7 +13,7 @@ installGlobals(); const ABORT_DELAY = 5_000; -export const handleError = Sentry.wrapRemixHandleError; +export const handleError = Sentry.sentryHandleError; export default function handleRequest( request: Request, diff --git a/packages/browser-utils/src/metrics/web-vitals/types/base.ts b/packages/browser-utils/src/metrics/web-vitals/types/base.ts index 6b612e7e22c5..846744d96da5 100644 --- a/packages/browser-utils/src/metrics/web-vitals/types/base.ts +++ b/packages/browser-utils/src/metrics/web-vitals/types/base.ts @@ -104,15 +104,6 @@ export type MetricWithAttribution = */ export type MetricRatingThresholds = [number, number]; -/** - * @deprecated Use metric-specific function types instead, such as: - * `(metric: LCPMetric) => void`. If a single callback type is needed for - * multiple metrics, use `(metric: MetricType) => void`. - */ -export interface ReportCallback { - (metric: MetricType): void; -} - export interface ReportOpts { reportAllChanges?: boolean; durationThreshold?: number; diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 56c7dd449602..40d7926efdd1 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -39,8 +39,6 @@ export { } from './tracing/browserTracingIntegration'; export type { RequestInstrumentationOptions } from './tracing/request'; export { - // eslint-disable-next-line deprecation/deprecation - addTracingExtensions, registerSpanErrorInstrumentation, getActiveSpan, getRootSpan, diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index 803520c166b6..899e12133d2a 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -1079,11 +1079,13 @@ export abstract class Client { /** * @deprecated Use `Client` instead. This alias may be removed in a future major version. */ +// TODO(v10): Remove export type BaseClient = Client; /** * @deprecated Use `Client` instead. This alias may be removed in a future major version. */ +// TODO(v10): Remove export const BaseClient = Client; /** diff --git a/packages/core/src/fetch.ts b/packages/core/src/fetch.ts index 9cd295520926..8998eb45fce0 100644 --- a/packages/core/src/fetch.ts +++ b/packages/core/src/fetch.ts @@ -1,5 +1,3 @@ -import type { Client } from './client'; -import type { Scope } from './scope'; import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from './semanticAttributes'; import { SPAN_STATUS_ERROR, setHttpStatus, startInactiveSpan } from './tracing'; import { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan'; @@ -201,27 +199,6 @@ function _addTracingHeadersToFetchRequest( } } -/** - * Adds sentry-trace and baggage headers to the various forms of fetch headers. - * - * @deprecated This function will not be exported anymore in v9. - */ -export function addTracingHeadersToFetchRequest( - request: string | unknown, - _client: Client | undefined, - _scope: Scope | undefined, - fetchOptionsObj: { - headers?: - | { - [key: string]: string[] | string | undefined; - } - | PolymorphicRequestHeaders; - }, - span?: Span, -): PolymorphicRequestHeaders | undefined { - return _addTracingHeadersToFetchRequest(request as Request, fetchOptionsObj, span); -} - function getFullURL(url: string): string | undefined { try { const parsed = new URL(url); diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index dcc56a1ca890..6349e342ff1d 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -110,11 +110,7 @@ export { rewriteFramesIntegration } from './integrations/rewriteframes'; export { zodErrorsIntegration } from './integrations/zoderrors'; export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter'; export { profiler } from './profiling'; -export { - // eslint-disable-next-line deprecation/deprecation - addTracingHeadersToFetchRequest, - instrumentFetchRequest, -} from './fetch'; +export { instrumentFetchRequest } from './fetch'; export { trpcMiddleware } from './trpc'; export { captureFeedback } from './feedback'; export type { ReportDialogOptions } from './report-dialog'; diff --git a/packages/core/src/tracing/hubextensions.ts b/packages/core/src/tracing/hubextensions.ts deleted file mode 100644 index 3b08bc16a319..000000000000 --- a/packages/core/src/tracing/hubextensions.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { registerSpanErrorInstrumentation } from './errors'; - -/** - * @deprecated Use `registerSpanErrorInstrumentation()` instead. In v9, this function will be removed. Note that you don't need to call this in Node-based SDKs or when using `browserTracingIntegration`. - */ -export function addTracingExtensions(): void { - registerSpanErrorInstrumentation(); -} diff --git a/packages/core/src/tracing/index.ts b/packages/core/src/tracing/index.ts index a6905741d1c9..c163e263d56d 100644 --- a/packages/core/src/tracing/index.ts +++ b/packages/core/src/tracing/index.ts @@ -1,7 +1,5 @@ export { registerSpanErrorInstrumentation } from './errors'; export { setCapturedScopesOnSpan, getCapturedScopesOnSpan } from './utils'; -// eslint-disable-next-line deprecation/deprecation -export { addTracingExtensions } from './hubextensions'; export { startIdleSpan, TRACING_DEFAULTS } from './idleSpan'; export { SentrySpan } from './sentrySpan'; export { SentryNonRecordingSpan } from './sentryNonRecordingSpan'; diff --git a/packages/core/src/utils-hoist/index.ts b/packages/core/src/utils-hoist/index.ts index dea0d16159a3..a593b72e73ad 100644 --- a/packages/core/src/utils-hoist/index.ts +++ b/packages/core/src/utils-hoist/index.ts @@ -47,8 +47,7 @@ export { parseSemver, uuid4, } from './misc'; -// eslint-disable-next-line deprecation/deprecation -export { dynamicRequire, isNodeEnv, loadModule } from './node'; +export { isNodeEnv, loadModule } from './node'; export { normalize, normalizeToSize, normalizeUrlToBase } from './normalize'; export { addNonEnumerableProperty, @@ -136,8 +135,6 @@ export { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStack export { callFrameToStackFrame, watchdogTimer } from './anr'; export { LRUMap } from './lru'; export { - // eslint-disable-next-line deprecation/deprecation - generatePropagationContext, generateTraceId, generateSpanId, } from './propagationContext'; diff --git a/packages/core/src/utils-hoist/node.ts b/packages/core/src/utils-hoist/node.ts index 3805248bdedd..a0311efc7a93 100644 --- a/packages/core/src/utils-hoist/node.ts +++ b/packages/core/src/utils-hoist/node.ts @@ -23,10 +23,9 @@ export function isNodeEnv(): boolean { * Requires a module which is protected against bundler minification. * * @param request The module path to resolve - * @deprecated This function will be removed in the next major version. */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -export function dynamicRequire(mod: any, request: string): any { +function dynamicRequire(mod: any, request: string): any { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return mod.require(request); } @@ -48,7 +47,6 @@ export function loadModule(moduleName: string): T | undefined { let mod: T | undefined; try { - // eslint-disable-next-line deprecation/deprecation mod = dynamicRequire(module, moduleName); } catch (e) { // no-empty @@ -56,9 +54,7 @@ export function loadModule(moduleName: string): T | undefined { if (!mod) { try { - // eslint-disable-next-line deprecation/deprecation const { cwd } = dynamicRequire(module, 'process'); - // eslint-disable-next-line deprecation/deprecation mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) as T; } catch (e) { // no-empty diff --git a/packages/core/src/utils-hoist/propagationContext.ts b/packages/core/src/utils-hoist/propagationContext.ts index d3d291075658..c95fa7c00c12 100644 --- a/packages/core/src/utils-hoist/propagationContext.ts +++ b/packages/core/src/utils-hoist/propagationContext.ts @@ -1,18 +1,5 @@ -import type { PropagationContext } from '../types-hoist'; import { uuid4 } from './misc'; -/** - * Returns a new minimal propagation context. - * - * @deprecated Use `generateTraceId` and `generateSpanId` instead. - */ -export function generatePropagationContext(): PropagationContext { - return { - traceId: generateTraceId(), - sampleRand: Math.random(), - }; -} - /** * Generate a random, valid trace ID. */ diff --git a/packages/opentelemetry/src/index.ts b/packages/opentelemetry/src/index.ts index 572b154f6add..19a61f0f130f 100644 --- a/packages/opentelemetry/src/index.ts +++ b/packages/opentelemetry/src/index.ts @@ -24,8 +24,6 @@ export { getDynamicSamplingContextFromSpan } from '@sentry/core'; export { isSentryRequestSpan } from './utils/isSentryRequest'; export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName'; -// eslint-disable-next-line deprecation/deprecation -export { generateSpanContextForPropagationContext } from './utils/generateSpanContextForPropagationContext'; export { getActiveSpan } from './utils/getActiveSpan'; export { diff --git a/packages/opentelemetry/src/utils/generateSpanContextForPropagationContext.ts b/packages/opentelemetry/src/utils/generateSpanContextForPropagationContext.ts deleted file mode 100644 index bf0af49b1200..000000000000 --- a/packages/opentelemetry/src/utils/generateSpanContextForPropagationContext.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { SpanContext } from '@opentelemetry/api'; -import { TraceFlags } from '@opentelemetry/api'; -import type { PropagationContext } from '@sentry/core'; -import { makeTraceState } from './makeTraceState'; - -/** - * Generates a SpanContext that represents a PropagationContext. - * This can be set on a `context` to make this a (virtual) active span. - * - * @deprecated This function is deprecated and will be removed in the next major version. - */ -export function generateSpanContextForPropagationContext(propagationContext: PropagationContext): SpanContext { - // We store the DSC as OTEL trace state on the span context - const traceState = makeTraceState({ - dsc: propagationContext.dsc, - sampled: propagationContext.sampled, - }); - - const spanContext: SpanContext = { - traceId: propagationContext.traceId, - // TODO: Do not create an invalid span context here - spanId: propagationContext.parentSpanId || '', - isRemote: true, - traceFlags: propagationContext.sampled ? TraceFlags.SAMPLED : TraceFlags.NONE, - traceState, - }; - - return spanContext; -} diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index 04b9a3859351..bd2a270edf5c 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -129,8 +129,6 @@ export { export * from '@sentry/node'; export { - // eslint-disable-next-line deprecation/deprecation - wrapRemixHandleError, sentryHandleError, wrapHandleErrorWithSentry, } from './utils/instrumentServer'; @@ -158,20 +156,6 @@ export function getRemixDefaultIntegrations(options: RemixOptions): Integration[ ].filter(int => int) as Integration[]; } -/** - * Returns the given Express createRequestHandler function. - * This function is no-op and only returns the given function. - * - * @deprecated No need to wrap the Express request handler. - * @param createRequestHandlerFn The Remix Express `createRequestHandler`. - * @returns `createRequestHandler` function. - */ -export function wrapExpressCreateRequestHandler(createRequestHandlerFn: unknown): unknown { - DEBUG_BUILD && logger.warn('wrapExpressCreateRequestHandler is deprecated and no longer needed.'); - - return createRequestHandlerFn; -} - /** Initializes Sentry Remix SDK on Node. */ export function init(options: RemixOptions): NodeClient | undefined { applySdkMetadata(options, 'remix', ['remix', 'node']); diff --git a/packages/remix/src/utils/instrumentServer.ts b/packages/remix/src/utils/instrumentServer.ts index 0ea54986f55c..90ce8217f4db 100644 --- a/packages/remix/src/utils/instrumentServer.ts +++ b/packages/remix/src/utils/instrumentServer.ts @@ -72,11 +72,6 @@ export function sentryHandleError(err: unknown, { request }: DataFunctionArgs): }); } -/** - * @deprecated Use `sentryHandleError` instead. - */ -export const wrapRemixHandleError = sentryHandleError; - /** * Sentry wrapper for Remix's `handleError` function. * Remix Docs: https://remix.run/docs/en/main/file-conventions/entry.server#handleerror