Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sentrycore: set generated exceptionType on last exception instead of …
…the first (#60) Every once in a while an unhelpfully formatted error shows up in our Sentry reporting: ![image](https://github.com/sourcegraph/log/assets/23356519/9777f12a-09e9-4945-a0b2-d78be3472dd3) After digging into this because it bothers me, turns out that even though the Sentry library says "first" exception is used for the title it actually uses the last one! Sure enough, this is mentioned in the cockroach error source: https://github.com/cockroachdb/errors/blob/26622367a22260fa287d2f7aa2a085b0324c74ee/report/report.go#L324-L325 and we see it in action in the Sentry UI, the title is the exception we _don't_ overwrite when there are multiple: ![image](https://github.com/sourcegraph/log/assets/23356519/2f5318dd-cb6f-4467-9857-cdcc1b3c3fc3) Another example: https://sourcegraph.sentry.io/issues/4193949796/?project=6583153 The errors where the title is what we want all have only 1 generated exception. I originally thought that maybe we should overwrite each detected exception individually with a different generated message that has been tidied up, but the Sentry exception struct is a bit weird so I figured whatever, we can revisit this next time.
- Loading branch information