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
It's pretty common in Go to use errors.New and fmt.Errorf very liberally, rarely creating your own types for errors. If you do that, bugsnag will group by the ErrorClass, resulting in a bunch of very different errors being grouped together. Can we add a way to configure this?
The text was updated successfully, but these errors were encountered:
It'll only group them together if they happen from the same line of code, so it's not too too bad.
Happy to think about ways of making this better. From past experience just using the message is terrible, as messages are too unique so you end up with the opposite problem.
In case someone else gets to here because grouping is too broad, the key ingredient for correct grouping is to set ProjectPackages in your configuration to a suitable value (e.g. []string{"github.com/yourco/yourproj/**"}) as the grouping goes by the top most line that's in-project, but if it finds nothing in-project it will just use the top line which is likely something like
runtime/panic.go:489 gopanic
(or maybe it just skips the top file:line and uses the error class exclusively?)
making everything sharing an error class group together.
https://github.com/bugsnag/bugsnag-go/blob/master/event.go#L55
It's pretty common in Go to use
errors.New
andfmt.Errorf
very liberally, rarely creating your own types for errors. If you do that, bugsnag will group by the ErrorClass, resulting in a bunch of very different errors being grouped together. Can we add a way to configure this?The text was updated successfully, but these errors were encountered: