Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Feb 2, 2024
1 parent 8889d6f commit 1d4be11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"test:integration:v2": "export REMIX_VERSION=2 && run-s test:integration:v1",
"test:integration:tracingIntegration": "export TRACING_INTEGRATION=true && run-s test:integration:v2",
"test:integration:ci": "run-s test:integration:clean test:integration:prepare test:integration:client:ci test:integration:server",
"test:integration:prepare": "(cd test/integration && yarn install --force)",
"test:integration:prepare": "(cd test/integration && yarn install)",
"test:integration:clean": "(cd test/integration && rimraf .cache node_modules build)",
"test:integration:client": "yarn playwright install-deps && yarn playwright test test/integration/test/client/ --project='chromium'",
"test:integration:client:ci": "yarn test:integration:client --reporter='line'",
Expand Down
12 changes: 6 additions & 6 deletions packages/remix/src/client/performance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let _useLocation: UseLocation | undefined;
let _useMatches: UseMatches | undefined;

let _customStartTransaction: ((context: TransactionContext) => Span | undefined) | undefined;
let _startTransactionOnLocationChange: boolean | undefined;
let _instrumentNavigation: boolean | undefined;

function getInitPathName(): string | undefined {
if (WINDOW && WINDOW.location) {
Expand Down Expand Up @@ -140,7 +140,7 @@ export function remixRouterInstrumentation(useEffect: UseEffect, useLocation: Us
useEffect,
useLocation,
useMatches,
startTransactionOnLocationChange,
instrumentNavigation: startTransactionOnLocationChange,
customStartTransaction,
});

Expand Down Expand Up @@ -212,7 +212,7 @@ export function withSentry<P extends Record<string, unknown>, R extends React.Co
return;
}

if (_startTransactionOnLocationChange && matches && matches.length) {
if (_instrumentNavigation && matches && matches.length) {
if (activeRootSpan) {
activeRootSpan.end();
}
Expand Down Expand Up @@ -242,18 +242,18 @@ export function setGlobals({
useEffect,
useLocation,
useMatches,
startTransactionOnLocationChange,
instrumentNavigation,
customStartTransaction,
}: {
useEffect?: UseEffect;
useLocation?: UseLocation;
useMatches?: UseMatches;
startTransactionOnLocationChange?: boolean;
instrumentNavigation?: boolean;
customStartTransaction?: (context: TransactionContext) => Span | undefined;
}): void {
_useEffect = useEffect;
_useLocation = useLocation;
_useMatches = useMatches;
_startTransactionOnLocationChange = startTransactionOnLocationChange;
_instrumentNavigation = instrumentNavigation;
_customStartTransaction = customStartTransaction;
}

0 comments on commit 1d4be11

Please sign in to comment.