Skip to content

Commit 924850f

Browse files
author
Luca Forstner
committed
s/spanLabel/spanDescription/
1 parent a7c103d commit 924850f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/nextjs/src/edge/utils/edgeWrapperUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { flush } from './flush';
1717
*/
1818
export function withEdgeWrapping<H extends EdgeRouteHandler>(
1919
handler: H,
20-
options: { spanLabel: string; spanOp: string; mechanismFunctionName: string },
20+
options: { spanDescription: string; spanOp: string; mechanismFunctionName: string },
2121
): (...params: Parameters<H>) => Promise<ReturnType<H>> {
2222
return async function (this: unknown, ...args) {
2323
const req = args[0];
@@ -29,7 +29,7 @@ export function withEdgeWrapping<H extends EdgeRouteHandler>(
2929
if (hasTracingEnabled()) {
3030
if (prevSpan) {
3131
span = prevSpan.startChild({
32-
description: options.spanLabel,
32+
description: options.spanDescription,
3333
op: options.spanOp,
3434
});
3535
} else if (req instanceof Request) {
@@ -46,7 +46,7 @@ export function withEdgeWrapping<H extends EdgeRouteHandler>(
4646

4747
span = startTransaction(
4848
{
49-
name: options.spanLabel,
49+
name: options.spanDescription,
5050
op: options.spanOp,
5151
...traceparentData,
5252
metadata: {

packages/nextjs/src/edge/withSentryAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function withSentryAPI<H extends EdgeRouteHandler>(
1616
const isCalledByUser = getCurrentHub().getScope()?.getTransaction();
1717

1818
const wrappedHandler = withEdgeWrapping(handler, {
19-
spanLabel:
19+
spanDescription:
2020
isCalledByUser || !(req instanceof Request)
2121
? `handler (${parameterizedRoute})`
2222
: `${req.method} ${parameterizedRoute}`,

packages/nextjs/src/edge/withSentryMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function withSentryMiddleware<H extends EdgeRouteHandler>(
88
middleware: H,
99
): (...params: Parameters<H>) => Promise<ReturnType<H>> {
1010
return withEdgeWrapping(middleware, {
11-
spanLabel: 'middleware',
11+
spanDescription: 'middleware',
1212
spanOp: 'middleware.nextjs',
1313
mechanismFunctionName: 'withSentryMiddleware',
1414
});

0 commit comments

Comments
 (0)