You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
When using the Express middleware, Raven ignores all properties of the request object except a handpicked set of properties. If the request information has other properties relevant for the error report, they are lost*
What is the expected behaviour?
Provide a configurable method that receives the original request and returns an object of custom properties that will be attached to the report, either as extras or tags.
*There is currently a workaround: we can use the parseUser method for this, but feels a bit hacky.
I can make a PR for this change, but I first want to know what's the feeling about this. Is this a valid concern?
In my particular use case, we have a middleware that annotates the request object with some info extracted form the URL, plus some values from the environment. I'd like to send that info with the error report, but it is difficult to re-compute some of those values because the original value might have changed.
The text was updated successfully, but these errors were encountered:
I'm not sure if we want another config option right now, as we're in the process of writing next major version of our JS SDKs and every new option, will make it more complicated.
There are two things that I can propose. We can either add more options to be handpicked (if they are "somewhat" generic) or prior to catching the error in the middleware (which I assume you already do if you follow our docs), you can attach those properties directly to req object in the errorHandler, so that they'll be copied over - https://github.com/getsentry/raven-node/blob/master/lib/client.js#L551-L568
Do you want to request a feature or report a bug?
Feature request
Has someone had this problem before?
Similar to #360
What is the current behavior?
When using the Express middleware, Raven ignores all properties of the
request
object except a handpicked set of properties. If therequest
information has other properties relevant for the error report, they are lost*What is the expected behaviour?
Provide a configurable method that receives the original
request
and returns an object of custom properties that will be attached to the report, either as extras or tags.*There is currently a workaround: we can use the
parseUser
method for this, but feels a bit hacky.I can make a PR for this change, but I first want to know what's the feeling about this. Is this a valid concern?
In my particular use case, we have a middleware that annotates the request object with some info extracted form the URL, plus some values from the environment. I'd like to send that info with the error report, but it is difficult to re-compute some of those values because the original value might have changed.
The text was updated successfully, but these errors were encountered: