We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 793a4b5 commit 0994d0eCopy full SHA for 0994d0e
packages/nextjs/src/server/index.ts
@@ -307,6 +307,10 @@ export function init(options: NodeOptions): NodeClient | undefined {
307
if (typeof method === 'string' && typeof route === 'string') {
308
event.transaction = `${method} ${route.replace(/\/route$/, '')}`;
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, we drop it.
312
+ // This is important in the case of edge-runtime where Next.js will also create unnecessary Node.js root spans, that are not parameterized.
313
+ return null;
314
}
315
316
0 commit comments