Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/node
SDK Version
7.16.0
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
My code looks roughly like this:
const app = express()
const APIv1 = Router()
APIv1.post('/test', ...)
const root = Router()
// Here's the important part
app.use('/api', root)
app.use('/api/v1', APIv1)
I then send POST /api/v1/test
Expected Result
The transaction name (in the Performance tab) should be POST /api/v1/test/
Actual Result
The transaction name is POST /api/api/v1/test/
It works if I swap the order of the routers:
app.use('/api/v1', APIv1)
app.use('/api', root)
This worked as expected in previous versions (at least in 6.17.8 but not in 7.13.0).