Skip to content
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

Changing the exception title in Sentry? #284

Closed
davidames opened this issue Oct 9, 2019 · 1 comment
Closed

Changing the exception title in Sentry? #284

davidames opened this issue Oct 9, 2019 · 1 comment
Labels
Feature New feature or request

Comments

@davidames
Copy link

This is similar to #270 in that the title of the Sentry exception in the dashboard will often be an aggregate exception or a DbUpdateException - with the really useful information in the inner exception.

I've been "playing" with how to resolve this. Ideally, we would preserve all the exceptions as they contain stack traces with different information.

The closest that I've come is to have an BeforeSend which generates a new SentryEvent based on the incoming SentryEvent and returning that but doing

SentryExceptions = sourceEvent.SentryExceptions.Reverse()

This achieves my goal of getting the inner exception title on the dashboard -is there another way as this kind of feels clunky.

@bruno-garcia bruno-garcia added Feature New feature or request Sentry labels Oct 12, 2019
@bruno-garcia
Copy link
Member

It's a good point that having AggregateException isn't very helpful.
If you don't mind, please upvote #270 and let's close this as a duplicate.

In case you'd like to try a PR on this, it would be helpful although I don't think just reversing the exceptions is the way to go. Often the top most exception is what you want to see. It's the case of AggregateException and maybe a handful others that they are just wrappers.

Perhaps a list of Exception types to drop altogether. There's a code snippet on #270 on how to drop a single type, we could just extend that to be more generic.

Also, note you don't need to return a new instance of the event. You can just modify it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants