Can transactions be grouped?

I’ve just added performance monitoring to my node.js application (Nest.js using Express.js as engine) and it’s great, but GET requests with different URL parameters are getting logged as different transactions. So I get transactions like:

GET /api/v1/users/1/
GET /api/v1/users/2/
GET /api/v1/users/3/

You get the point. This makes them very hard to analyse as you can’t see how an endpoint is performing in general. Is there a way to define grouping in a simple way? I guess I could manually override Sentry and name transactions based on URL pattern when the request arrives, but honestly that sounds like a pretty crappy solution to me.

1 Like

Are you already using the Express integration? There is an express integration that should help capture more spans and give better transaction names.

2 Likes

I also have the same issue, using the default integration for Express. Say an express route is set as app.get("/user/:id", method) then id is a parameter and all /user API calls should be grouped together. Looking at the docs, could not find anything on how to configure this. Any help would be great!