File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/nextjs/src/server Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { isBuild } from '../common/utils/isBuild';
1010import { distDirRewriteFramesIntegration } from './distDirRewriteFramesIntegration' ;
1111
1212export * from '@sentry/node' ;
13+ import type { EventProcessor } from '@sentry/types' ;
1314import { onUncaughtExceptionIntegration } from './onUncaughtExceptionIntegration' ;
1415
1516export { captureUnderscoreErrorException } from '../common/_error' ;
@@ -72,7 +73,7 @@ export function init(options: NodeOptions): void {
7273 }
7374
7475 const customDefaultIntegrations = [
75- ...getDefaultIntegrations ( options ) . filter ( integration => integration . name = == 'OnUncaughtException' ) ,
76+ ...getDefaultIntegrations ( options ) . filter ( integration => integration . name ! == 'OnUncaughtException' ) ,
7677 onUncaughtExceptionIntegration ( ) ,
7778 ] ;
7879
@@ -106,11 +107,19 @@ export function init(options: NodeOptions): void {
106107
107108 nodeInit ( opts ) ;
108109
110+ const filterTransactions : EventProcessor = event => {
111+ return event . type === 'transaction' && event . transaction === '/404' ? null : event ;
112+ } ;
113+
114+ filterTransactions . id = 'NextServer404TransactionFilter' ;
115+
109116 setTag ( 'runtime' , 'node' ) ;
110117 if ( IS_VERCEL ) {
111118 setTag ( 'vercel' , true ) ;
112119 }
113120
121+ addEventProcessor ( filterTransactions ) ;
122+
114123 if ( process . env . NODE_ENV === 'development' ) {
115124 addEventProcessor ( devErrorSymbolicationEventProcessor ) ;
116125 }
You can’t perform that action at this time.
0 commit comments