Skip to content

Commit c60b6cb

Browse files
authored
fix(tracing): Align missing express span operation names (#6036)
1 parent 718d999 commit c60b6cb

File tree

2 files changed

+3
-3
lines changed
  • packages
    • node-integration-tests/suites/express/tracing
    • tracing/src/integrations/node

2 files changed

+3
-3
lines changed

packages/node-integration-tests/suites/express/tracing/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test('should create and send transactions for Express routes and spans for middl
2222
spans: [
2323
{
2424
description: 'corsMiddleware',
25-
op: 'express.middleware.use',
25+
op: 'middleware.express.use',
2626
},
2727
],
2828
});

packages/tracing/src/integrations/node/express.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function wrap(fn: Function, method: Method): (...args: any[]) => void {
159159
const transaction = res.__sentry_transaction;
160160
const span = transaction?.startChild({
161161
description: fn.name,
162-
op: `express.middleware.${method}`,
162+
op: `middleware.express.${method}`,
163163
});
164164
fn.call(this, req, res, function (this: NodeJS.Global, ...args: unknown[]): void {
165165
span?.finish();
@@ -178,7 +178,7 @@ function wrap(fn: Function, method: Method): (...args: any[]) => void {
178178
const transaction = res.__sentry_transaction;
179179
const span = transaction?.startChild({
180180
description: fn.name,
181-
op: `express.middleware.${method}`,
181+
op: `middleware.express.${method}`,
182182
});
183183
fn.call(this, err, req, res, function (this: NodeJS.Global, ...args: unknown[]): void {
184184
span?.finish();

0 commit comments

Comments
 (0)