Skip to content

URL parameterization not taking into account express routers in v8 #12103

Description

@richardsimko

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.0.0

Framework Version

Node: 20.12.2
Express: 4.19.2

Link to Sentry event

https://fl101.sentry.io/performance/trace/9bd6ae8a599b0919ccd1941defbcb6f5

SDK Setup

Sentry.init({dsn: process.env.SENTRY_DSN})

Steps to Reproduce

Mount a router with the following:

const apiRoutes = express.Router();
const fooApiRoutes = express.Router();

fooApiRoutes.get('/foo',() => {
});

apiRoutes.use(fooApiRoutes);

app.use('/api', apiRoutes);

Expected Result

Calls to GET /api/foo should be parameterized as such.

Trace collected with 7.x: https://fl101.sentry.io/performance/trace/9f106d65ff644716b32603965c85b61c/?node=span-a36c5a350b874100&node=txn-98cdcb0f6770474aaa27709f1adfe49b&statsPeriod=14d&timestamp=1715939877

Actual Result

They are presented as /foo.

Trace collected with 8.x: https://fl101.sentry.io/performance/trace/9bd6ae8a599b0919ccd1941defbcb6f5/?fov=0%2C112.99991607666016&node=txn-3ead7993a2bf44b99dc67e857ae743ec&statsPeriod=14d&timestamp=1715938309

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions