sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Recurring exceptions in Hangfire jobs result in lots of useless breadcrumbs

Open jamescrosswell opened this issue 4 months ago • 0 comments

When you have a hangfire job that fails repeatedly:

  • You get a useful error report when the exception is first reported
  • The error is then reported again, and again... ad infinitum
    • These subsequent errors become less and less useful because the breadcrumbs are just filled with this one exception

The behaviour to create a breadcrumb for any exceptions is something that was added in version 4.11.0.

In this particular case, since it's a recurring exception, all of those breadcrumbs aren't that useful... Potentially before adding a breadcrumb for an exception, we could check to see if a breadcrumb for the exact same exception already exists on the scope and, if so, skip it. As long as the stack trace was always the same, this might be possible.

Originally posted by @jamescrosswell in #3626

jamescrosswell avatar Sep 26 '24 03:09 jamescrosswell