diff --git a/packages/remix/src/client/performance.tsx b/packages/remix/src/client/performance.tsx index fd997544bb8b..f50bd5ac2a0e 100644 --- a/packages/remix/src/client/performance.tsx +++ b/packages/remix/src/client/performance.tsx @@ -13,7 +13,7 @@ import { startBrowserTracingPageLoadSpan, withErrorBoundary, } from '@sentry/react'; -import type { Span, StartSpanOptions, Transaction, TransactionContext } from '@sentry/types'; +import type { Span, StartSpanOptions, TransactionContext } from '@sentry/types'; import { isNodeEnv, logger } from '@sentry/utils'; import * as React from 'react'; @@ -121,34 +121,6 @@ function startNavigationSpan(matches: RouteMatch[]): void { } } -/** - * @deprecated Use `browserTracingIntegration` instead. - * - * Creates a react-router v6 instrumention for Remix applications. - * - * This implementation is slightly different (and simpler) from the react-router instrumentation - * as in Remix, `useMatches` hook is available where in react-router-v6 it's not yet. - */ -export function remixRouterInstrumentation(useEffect: UseEffect, useLocation: UseLocation, useMatches: UseMatches) { - return ( - customStartTransaction: (context: TransactionContext) => Transaction | undefined, - startTransactionOnPageLoad = true, - startTransactionOnLocationChange = true, - ): void => { - setGlobals({ - useEffect, - useLocation, - useMatches, - instrumentNavigation: startTransactionOnLocationChange, - customStartTransaction, - }); - - if (startTransactionOnPageLoad) { - startPageloadSpan(); - } - }; -} - /** * Wraps a remix `root` (see: https://remix.run/docs/en/v1/guides/migrating-react-router-app#creating-the-root-route) * To enable pageload/navigation tracing on every route. diff --git a/packages/remix/src/index.client.tsx b/packages/remix/src/index.client.tsx index a1d21486f6cc..17bcf6c46b31 100644 --- a/packages/remix/src/index.client.tsx +++ b/packages/remix/src/index.client.tsx @@ -2,11 +2,7 @@ import { applySdkMetadata, setTag } from '@sentry/core'; import { init as reactInit } from '@sentry/react'; import type { RemixOptions } from './utils/remixOptions'; export { captureRemixErrorBoundaryError } from './client/errors'; -export { - // eslint-disable-next-line deprecation/deprecation - remixRouterInstrumentation, - withSentry, -} from './client/performance'; +export { withSentry } from './client/performance'; export { browserTracingIntegration } from './client/browserTracingIntegration'; diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index 5860b9c41955..0eb5290781c2 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -96,8 +96,7 @@ export * from '@sentry/node-experimental'; export { captureRemixServerException, wrapRemixHandleError } from './utils/instrumentServer'; export { ErrorBoundary, withErrorBoundary } from '@sentry/react'; -// eslint-disable-next-line deprecation/deprecation -export { remixRouterInstrumentation, withSentry } from './client/performance'; +export { withSentry } from './client/performance'; export { captureRemixErrorBoundaryError } from './client/errors'; export { browserTracingIntegration } from './client/browserTracingIntegration'; export { wrapExpressCreateRequestHandler } from './utils/serverAdapters/express';