Skip to content

Commit

Permalink
fix(tracing): Align missing express span operation names (#6036)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Oct 25, 2022
1 parent 718d999 commit c60b6cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -22,7 +22,7 @@ test('should create and send transactions for Express routes and spans for middl
spans: [
{
description: 'corsMiddleware',
op: 'express.middleware.use',
op: 'middleware.express.use',
},
],
});
Expand Down
4 changes: 2 additions & 2 deletions packages/tracing/src/integrations/node/express.ts
Expand Up @@ -159,7 +159,7 @@ function wrap(fn: Function, method: Method): (...args: any[]) => void {
const transaction = res.__sentry_transaction;
const span = transaction?.startChild({
description: fn.name,
op: `express.middleware.${method}`,
op: `middleware.express.${method}`,
});
fn.call(this, req, res, function (this: NodeJS.Global, ...args: unknown[]): void {
span?.finish();
Expand All @@ -178,7 +178,7 @@ function wrap(fn: Function, method: Method): (...args: any[]) => void {
const transaction = res.__sentry_transaction;
const span = transaction?.startChild({
description: fn.name,
op: `express.middleware.${method}`,
op: `middleware.express.${method}`,
});
fn.call(this, err, req, res, function (this: NodeJS.Global, ...args: unknown[]): void {
span?.finish();
Expand Down

0 comments on commit c60b6cb

Please sign in to comment.