@@ -3,7 +3,6 @@ import { applySdkMetadata, debug, setTag } from '@sentry/core';
33import type { NodeClient , NodeOptions } from '@sentry/node' ;
44import { getDefaultIntegrations as getNodeDefaultIntegrations , init as initNodeSdk } from '@sentry/node' ;
55import { DEBUG_BUILD } from '../common/debug-build' ;
6- import { lowQualityTransactionsFilterIntegration } from './integration/lowQualityTransactionsFilterIntegration' ;
76import { reactRouterServerIntegration } from './integration/reactRouterServer' ;
87
98/**
@@ -13,11 +12,12 @@ import { reactRouterServerIntegration } from './integration/reactRouterServer';
1312export function getDefaultReactRouterServerIntegrations ( options : NodeOptions ) : Integration [ ] {
1413 return [
1514 ...getNodeDefaultIntegrations ( options ) ,
16- lowQualityTransactionsFilterIntegration ( options ) ,
1715 reactRouterServerIntegration ( ) ,
1816 ] ;
1917}
2018
19+ const LOW_QUALITY_TRANSACTIONS_REGEXES = [ / G E T \/ n o d e _ m o d u l e s \/ / , / G E T \/ f a v i c o n \. i c o / , / G E T \/ @ i d \/ / , / G E T \/ _ _ m a n i f e s t \? / ] ;
20+
2121/**
2222 * Initializes the server side of the React Router SDK
2323 */
@@ -27,6 +27,11 @@ export function init(options: NodeOptions): NodeClient | undefined {
2727 defaultIntegrations : getDefaultReactRouterServerIntegrations ( options ) ,
2828 } ;
2929
30+ opts . ignoreSpans = [
31+ ...( opts . ignoreSpans || [ ] ) ,
32+ ...LOW_QUALITY_TRANSACTIONS_REGEXES ,
33+ ] ;
34+
3035 DEBUG_BUILD && debug . log ( 'Initializing SDK...' ) ;
3136
3237 applySdkMetadata ( opts , 'react-router' , [ 'react-router' , 'node' ] ) ;
0 commit comments