File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { flush } from './flush';
17
17
*/
18
18
export function withEdgeWrapping < H extends EdgeRouteHandler > (
19
19
handler : H ,
20
- options : { spanLabel : string ; spanOp : string ; mechanismFunctionName : string } ,
20
+ options : { spanDescription : string ; spanOp : string ; mechanismFunctionName : string } ,
21
21
) : ( ...params : Parameters < H > ) => Promise < ReturnType < H > > {
22
22
return async function ( this : unknown , ...args ) {
23
23
const req = args [ 0 ] ;
@@ -29,7 +29,7 @@ export function withEdgeWrapping<H extends EdgeRouteHandler>(
29
29
if ( hasTracingEnabled ( ) ) {
30
30
if ( prevSpan ) {
31
31
span = prevSpan . startChild ( {
32
- description : options . spanLabel ,
32
+ description : options . spanDescription ,
33
33
op : options . spanOp ,
34
34
} ) ;
35
35
} else if ( req instanceof Request ) {
@@ -46,7 +46,7 @@ export function withEdgeWrapping<H extends EdgeRouteHandler>(
46
46
47
47
span = startTransaction (
48
48
{
49
- name : options . spanLabel ,
49
+ name : options . spanDescription ,
50
50
op : options . spanOp ,
51
51
...traceparentData ,
52
52
metadata : {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export function withSentryAPI<H extends EdgeRouteHandler>(
16
16
const isCalledByUser = getCurrentHub ( ) . getScope ( ) ?. getTransaction ( ) ;
17
17
18
18
const wrappedHandler = withEdgeWrapping ( handler , {
19
- spanLabel :
19
+ spanDescription :
20
20
isCalledByUser || ! ( req instanceof Request )
21
21
? `handler (${ parameterizedRoute } )`
22
22
: `${ req . method } ${ parameterizedRoute } ` ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export function withSentryMiddleware<H extends EdgeRouteHandler>(
8
8
middleware : H ,
9
9
) : ( ...params : Parameters < H > ) => Promise < ReturnType < H > > {
10
10
return withEdgeWrapping ( middleware , {
11
- spanLabel : 'middleware' ,
11
+ spanDescription : 'middleware' ,
12
12
spanOp : 'middleware.nextjs' ,
13
13
mechanismFunctionName : 'withSentryMiddleware' ,
14
14
} ) ;
You can’t perform that action at this time.
0 commit comments