-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
5.18.1
Description
Using express routers a middlewares, sentry create a transaction name including only the path in the last router.
Here is an example:
const express = require('express');
const Sentry = require('@sentry/node');
const app = express();
Sentry.init({ dsn: 'secret' });
const subRouter = express.Router();
subRouter.get('throw-new-error', (req, res) => {
throw new Error('An error');
});
app.use(Sentry.Handlers.requestHandler());
app.use('/sub', subRouter);
app.use(Sentry.Handlers.errorHandler());
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});So here, when I GET /sub/throw-new-error, the transaction name will be GET|/throw-new-error instead of GET|/sub/throw-new-error.
Metadata
Metadata
Assignees
Labels
No labels