Skip to content

Group by Exception Message and Exception Type #160

Open
@DeanGoodfynd

Description

@DeanGoodfynd

Description

Bugsnag default grouping uses the Exception class to determine how to group error reports. However, many libraries written in Microsoft DotNet use a common exception Type and distinguish the particular cause of the error by the exception Message. This can cause BugSnag to lump together bugs that have very different causes.

Describe the solution you'd like
Ideally, I'd like to designate certain exception classes for which a combination of Exception Type and Exception Message will be used as the grouping discriminator (hash?).

Note that we probably don't want to use the Exception Message but rather the Exception Message Template. Often the Exception Message contains specifics about the error thrown, which may mean that the error messages won't get grouped at all. But I suspect this situation will improve as more libraries are updated to use structured logging.
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-6.0

For example, newer versions of Visual Studio encourage the use of structured message logging templates as part of code quality standards: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2254

Describe alternatives you've considered
Maybe we don't need to specify which C# classes need to be unpacked this way? If we can determine that MessageTemplate != Message, we know that structured logging is in effect, and we can just group bugs according to the structured logging rules.

Additional context
One key reason for requesting this feature is that we make use of many third-party libraries that we've brought in via NuGet packages. We don't have control over how these libraries throw errors. Sadly many of these providers throw a single exception type and use message to distinguish what happened.

One key example from the ecommerce domain: Stripe throws nearly everything as a StripeException, but with vastly different exception messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogWe hope to fix this feature/bug in the futurefeature requestRequest for a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions