Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Extract arbitrary attributes from original request object. #450

@scinos

Description

@scinos

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 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions