From c60b6cbc633facd75d842b81aec5974b4c46f2e9 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 25 Oct 2022 12:23:50 +0200 Subject: [PATCH] fix(tracing): Align missing express span operation names (#6036) --- .../node-integration-tests/suites/express/tracing/test.ts | 2 +- packages/tracing/src/integrations/node/express.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/node-integration-tests/suites/express/tracing/test.ts b/packages/node-integration-tests/suites/express/tracing/test.ts index aaf00a899051..0ecd2e403aeb 100644 --- a/packages/node-integration-tests/suites/express/tracing/test.ts +++ b/packages/node-integration-tests/suites/express/tracing/test.ts @@ -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', }, ], }); diff --git a/packages/tracing/src/integrations/node/express.ts b/packages/tracing/src/integrations/node/express.ts index 371661982234..495832a8334b 100644 --- a/packages/tracing/src/integrations/node/express.ts +++ b/packages/tracing/src/integrations/node/express.ts @@ -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(); @@ -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();