Identifying Duplicate Exceptions for Bug Tracking

I have developed a "Proof of Concept" application that logs unhandled exceptions from an application to a bug tracker (Team Foundation Server in this case, but it can be ANY bug tracker). The limitation of this idea is that I don't want duplicate Bug items to open every time the same exception is thrown (for example, many users encounter an exception - that's another "error").

My first attempt was to store the exception type, message and stack trace as fields in a bug tracker. Then the logging component ran a query in the "Error store" to see if there was an open error with the same information. (In this example .NET - but I would think the concept is platform independent).

Obviously, the problem is that these fields can be very large (in particular, a stack trace) - and require a "full-text" implementation to implement them, and are very expensive to find.

I was wondering what approaches have been defined for this problem. I heard that FogBugz, for example, had such a feature to automatically track bugs, and was curious how it was implemented.

+1


source to share


3 answers


You can create a hash of the stack trace checksum and store it as an indexed column. This way the Bug Store query will be pretty fast to avoid duplicate insertion.



+1


source


If you have a stack trace, you can find the last statement in the stack trace and compare it to the ones already logged. If characters were included, you also got the line number. So now you have two things to compare: the actual error number and the assertion that failed, and possibly the actual line number. If something has already been reported with all of them, then it is more than likely (not 100%, of course) the same problem.

In fact, you could probably parse the stack trace with the word "at" since every line in the stack trace starts with "at". So find the last "at", get that line, compare it with the same last "at" line of the saved stack traces, and you might end up with something.



NTN!

+2


source


You can look at the source code for one of the existing open source solutions that combine exceptions.

For example: https://github.com/getsentry/sentry/tree/master/src/sentry

This is not an easy problem and complex heuristics exist (for example, the same exception was reported in different ways in different browsers, for example exceptions thrown by browser extensions are common and rarely important).

0


source







All Articles