Skip to content

Commit 1d4be11

Browse files
committed
Address review comments.
1 parent 8889d6f commit 1d4be11

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/remix/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"test:integration:v2": "export REMIX_VERSION=2 && run-s test:integration:v1",
7676
"test:integration:tracingIntegration": "export TRACING_INTEGRATION=true && run-s test:integration:v2",
7777
"test:integration:ci": "run-s test:integration:clean test:integration:prepare test:integration:client:ci test:integration:server",
78-
"test:integration:prepare": "(cd test/integration && yarn install --force)",
78+
"test:integration:prepare": "(cd test/integration && yarn install)",
7979
"test:integration:clean": "(cd test/integration && rimraf .cache node_modules build)",
8080
"test:integration:client": "yarn playwright install-deps && yarn playwright test test/integration/test/client/ --project='chromium'",
8181
"test:integration:client:ci": "yarn test:integration:client --reporter='line'",

packages/remix/src/client/performance.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ let _useLocation: UseLocation | undefined;
5252
let _useMatches: UseMatches | undefined;
5353

5454
let _customStartTransaction: ((context: TransactionContext) => Span | undefined) | undefined;
55-
let _startTransactionOnLocationChange: boolean | undefined;
55+
let _instrumentNavigation: boolean | undefined;
5656

5757
function getInitPathName(): string | undefined {
5858
if (WINDOW && WINDOW.location) {
@@ -140,7 +140,7 @@ export function remixRouterInstrumentation(useEffect: UseEffect, useLocation: Us
140140
useEffect,
141141
useLocation,
142142
useMatches,
143-
startTransactionOnLocationChange,
143+
instrumentNavigation: startTransactionOnLocationChange,
144144
customStartTransaction,
145145
});
146146

@@ -212,7 +212,7 @@ export function withSentry<P extends Record<string, unknown>, R extends React.Co
212212
return;
213213
}
214214

215-
if (_startTransactionOnLocationChange && matches && matches.length) {
215+
if (_instrumentNavigation && matches && matches.length) {
216216
if (activeRootSpan) {
217217
activeRootSpan.end();
218218
}
@@ -242,18 +242,18 @@ export function setGlobals({
242242
useEffect,
243243
useLocation,
244244
useMatches,
245-
startTransactionOnLocationChange,
245+
instrumentNavigation,
246246
customStartTransaction,
247247
}: {
248248
useEffect?: UseEffect;
249249
useLocation?: UseLocation;
250250
useMatches?: UseMatches;
251-
startTransactionOnLocationChange?: boolean;
251+
instrumentNavigation?: boolean;
252252
customStartTransaction?: (context: TransactionContext) => Span | undefined;
253253
}): void {
254254
_useEffect = useEffect;
255255
_useLocation = useLocation;
256256
_useMatches = useMatches;
257-
_startTransactionOnLocationChange = startTransactionOnLocationChange;
257+
_instrumentNavigation = instrumentNavigation;
258258
_customStartTransaction = customStartTransaction;
259259
}

0 commit comments

Comments
 (0)