Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions static/app/bootstrap/initializeSdk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import type {Event} from '@sentry/core';
import * as Sentry from '@sentry/react';

import {SENTRY_RELEASE_VERSION, SPA_DSN} from 'sentry/constants';
import {NODE_ENV, SENTRY_RELEASE_VERSION, SPA_DSN} from 'sentry/constants';
import type {Config} from 'sentry/types/system';
import {addExtraMeasurements, addUIElementTag} from 'sentry/utils/performanceForSentry';
import normalizeUrl from 'sentry/utils/url/normalizeUrl';
Expand Down Expand Up @@ -57,26 +57,29 @@ function getSentryIntegrations() {
// 6 is arbitrary, seems like a nice number
depth: 6,
}),
Sentry.reactRouterV6BrowserTracingIntegration({
useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
_experiments: {
enableStandaloneClsSpans: true,
enableStandaloneLcpSpans: true,
},
linkPreviousTrace: 'session-storage',
}),
// Blocks main thread for long periods with react 19.2 in dev mode
NODE_ENV === 'production'
? Sentry.reactRouterV6BrowserTracingIntegration({
useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
_experiments: {
enableStandaloneClsSpans: true,
enableStandaloneLcpSpans: true,
},
linkPreviousTrace: 'session-storage',
})
: null,
Sentry.browserProfilingIntegration(),
Sentry.thirdPartyErrorFilterIntegration({
filterKeys: ['sentry-spa'],
behaviour: 'apply-tag-if-contains-third-party-frames',
}),
Sentry.featureFlagsIntegration(),
Sentry.consoleLoggingIntegration(),
];
].filter(integration => integration !== null);

return integrations;
}
Expand Down
Loading