-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
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
Add e custom hook to allow to add custom data #299
Comments
@dnlup would that be something like the previous version that could allow us to run |
@fernandesGabriel Yes, I imagined the function could be useful to add more info, like the tags you are mentioning. The only difference with the previous version of the plugin would be that you don't need to implement a custom handler. |
That would be perfect @dnlup, I just upgraded to the new version of the plugin, and just noticed that we also have the use case you mention here. |
@fernandesGabriel I was thinking, wouldn't the |
Chiming in that this would be great to have as well! Either a way to expose beforeSend, or a way to expose adding custom context to errors |
The workaround for now is to use void app.register(fastifySentryPlugin, {
dsn: "...",
...,
beforeSend(event, hint) {
// Can do custom processing based on `hint.originalException`
return {
...event,
extra: {
...event.extra,
hello: "world"
},
};
}, That |
Thanks @noahsark769 for the feedback. So maybe something that allows us to use the |
I think it would be nice to expose an option to pass a custom function that can be used to enrich the event with custom data.
The text was updated successfully, but these errors were encountered: