Skip to content

Commit 8dfa7c2

Browse files
authored
feat(v8/remix): Remove remixRouterInstrumentation (#10933)
1 parent 4b261ce commit 8dfa7c2

File tree

3 files changed

+3
-36
lines changed

3 files changed

+3
-36
lines changed

packages/remix/src/client/performance.tsx

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
startBrowserTracingPageLoadSpan,
1414
withErrorBoundary,
1515
} from '@sentry/react';
16-
import type { Span, StartSpanOptions, Transaction, TransactionContext } from '@sentry/types';
16+
import type { Span, StartSpanOptions, TransactionContext } from '@sentry/types';
1717
import { isNodeEnv, logger } from '@sentry/utils';
1818
import * as React from 'react';
1919

@@ -121,34 +121,6 @@ function startNavigationSpan(matches: RouteMatch<string>[]): void {
121121
}
122122
}
123123

124-
/**
125-
* @deprecated Use `browserTracingIntegration` instead.
126-
*
127-
* Creates a react-router v6 instrumention for Remix applications.
128-
*
129-
* This implementation is slightly different (and simpler) from the react-router instrumentation
130-
* as in Remix, `useMatches` hook is available where in react-router-v6 it's not yet.
131-
*/
132-
export function remixRouterInstrumentation(useEffect: UseEffect, useLocation: UseLocation, useMatches: UseMatches) {
133-
return (
134-
customStartTransaction: (context: TransactionContext) => Transaction | undefined,
135-
startTransactionOnPageLoad = true,
136-
startTransactionOnLocationChange = true,
137-
): void => {
138-
setGlobals({
139-
useEffect,
140-
useLocation,
141-
useMatches,
142-
instrumentNavigation: startTransactionOnLocationChange,
143-
customStartTransaction,
144-
});
145-
146-
if (startTransactionOnPageLoad) {
147-
startPageloadSpan();
148-
}
149-
};
150-
}
151-
152124
/**
153125
* Wraps a remix `root` (see: https://remix.run/docs/en/v1/guides/migrating-react-router-app#creating-the-root-route)
154126
* To enable pageload/navigation tracing on every route.

packages/remix/src/index.client.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ import { applySdkMetadata, setTag } from '@sentry/core';
22
import { init as reactInit } from '@sentry/react';
33
import type { RemixOptions } from './utils/remixOptions';
44
export { captureRemixErrorBoundaryError } from './client/errors';
5-
export {
6-
// eslint-disable-next-line deprecation/deprecation
7-
remixRouterInstrumentation,
8-
withSentry,
9-
} from './client/performance';
5+
export { withSentry } from './client/performance';
106

117
export { browserTracingIntegration } from './client/browserTracingIntegration';
128

packages/remix/src/index.server.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ export * from '@sentry/node-experimental';
9696

9797
export { captureRemixServerException, wrapRemixHandleError } from './utils/instrumentServer';
9898
export { ErrorBoundary, withErrorBoundary } from '@sentry/react';
99-
// eslint-disable-next-line deprecation/deprecation
100-
export { remixRouterInstrumentation, withSentry } from './client/performance';
99+
export { withSentry } from './client/performance';
101100
export { captureRemixErrorBoundaryError } from './client/errors';
102101
export { browserTracingIntegration } from './client/browserTracingIntegration';
103102
export { wrapExpressCreateRequestHandler } from './utils/serverAdapters/express';

0 commit comments

Comments
 (0)