File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/nextjs/src/server Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,12 @@ export function init(options: NodeOptions): NodeClient | undefined {
307
307
if ( typeof method === 'string' && typeof route === 'string' ) {
308
308
event . transaction = `${ method } ${ route . replace ( / \/ r o u t e $ / , '' ) } ` ;
309
309
event . contexts . trace . data [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] = 'route' ;
310
+ } else {
311
+ // If we cannot hoist the route (or rather parameterize the transaction) for BaseServer.handleRequest spans,
312
+ // we drop it because the chance that it is a low-quality transaction we don't want is pretty high.
313
+ // This is important in the case of edge-runtime where Next.js will also create unnecessary Node.js root
314
+ // spans, that are not parameterized.
315
+ return null ;
310
316
}
311
317
}
312
318
You can’t perform that action at this time.
0 commit comments