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();