Skip to content

Commit 64122e8

Browse files
authored
ref(nextjs): Consolidate to use single setName call (#5683)
1 parent 74672a0 commit 64122e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nextjs/src/utils/instrumentServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ function makeWrappedMethodForGettingParameterizedPath(
332332
// replace specific URL with parameterized version
333333
if (transaction && transaction.metadata.requestPath) {
334334
const origPath = transaction.metadata.requestPath;
335-
transaction.name = transaction.name.replace(origPath, parameterizedPath);
336-
transaction.setMetadata({ source: 'route' });
335+
const newName = transaction.name.replace(origPath, parameterizedPath);
336+
transaction.setName(newName, 'route');
337337
}
338338

339339
return origMethod.call(this, parameterizedPath, ...args);

0 commit comments

Comments
 (0)