We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How are you running Sentry? @sentry/[email protected] Environment: N/A, can reproduce both locally, in docker and anywhere else
@sentry/[email protected]
When doing:
const router = new Router(); router.get('/bar', (req, res, next) => { next(new Errror('Foo')); }); app.use('/foo', someOtherRouter);
sentry would set the event.transaction to /bar as this is what req.url will point to.
event.transaction
/bar
req.url
See this doc. https://expressjs.com/en/api.html#req.originalUrl
Given my example in the description, I would expect to see full URL:
GET|/foo/bar
Sentry should try to get the URL from req.originalUrl. I am currently using this workaround:
req.originalUrl
const sentryRequestHandler = Sentry.Handlers.requestHandler(); app.use((req, res, next) => { sentryRequestHandler(req, res, () => { Sentry.getCurrentHub().configureScope(scope => { scope.addEventProcessor((event) => { event.transaction = `${req.method}|${req.originalUrl}`; return event; }); }); next(); }); });
This is patching the transaction to use .originalUrl
.originalUrl
The text was updated successfully, but these errors were encountered:
any news on this? the "possible solution" doesn't work either for me.
Sorry, something went wrong.
kamilogorek
Successfully merging a pull request may close this issue.
Important Details
How are you running Sentry?
@sentry/[email protected]
Environment: N/A, can reproduce both locally, in docker and anywhere else
Description
When doing:
sentry would set the
event.transaction
to/bar
as this is whatreq.url
will point to.See this doc.
https://expressjs.com/en/api.html#req.originalUrl
Steps to Reproduce
What you expected to happen
Given my example in the description, I would expect to see full URL:
Possible Solution
Sentry should try to get the URL from
req.originalUrl
. I am currently using this workaround:This is patching the transaction to use
.originalUrl
The text was updated successfully, but these errors were encountered: