Skip to content

fix(tracing): Align missing express span operation names #6036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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