If there is no stack trace or the first stack frame is missing the method name (either not set or equal to "?"), we use just the message.
If there is a stack trace and it has method name information in the first frame, it hashes the
Error.Message, plus the
MethodName properties of each stack frame are used. The
FileName is pased to remove query string parameters and path information, leaving a file name like "script.js". If the file name has ".min" or a string that looks like like hex, we will remove those. For example, the FileName "/js/docs/example.5AF331AD.min.js" would be treated the same as "/js/docs/example.js"
If the library has sent a
status code in the
UserCustomData , we use it. If there is a
type (HTTP method) in the
UserCustomData we will use it plus check for a
url and use that.
Same as Version 1, but adds better handling for translated messages as passed through to the error group name, as well as improve tiebreakers for well-known error strings when message-based fallback is used.
Same as Version 2, but groups on the message if the stack trace is null, or an empty array.
Same as Version 3, but improves grouping for AJAX errors by stripping the value extracted from
UserCustomData of the host and any segments which contain non alphanumeric characters. This means two AJAX errors which differ only by the URL of the failing request eg. 'https://example.com/123456/mypostendpoint' and 'http://example.com/998877/mypostendpoint' to group.
The subject of common error messages with known phrase structures will also be extracted and used in the input to the hash. This removes the chance of distinct errors (eg. 'foo is undefined' and 'bar is undefined') grouping together even when both errors have identical stacktraces.
An iteration on Version 4. This version extracts the subject variable or function name from even more common error messages. This results in improved grouping especially for errors with shorter stacktraces.
Eg. myappcode.1fde0bda54c.js and myappcode.36ee0bda4c.js will be treated as the same file when determining the error group.
Version 7 is a radical departure from our old model of trying to infer the data from the stack trace, message and other variables about what defines a group. Version 7 includes hardcoded rules that try to look more at the data in a manner that a human would. This new approach allows us to add additional rules and not destroy existing grouping hashes supporting incremental improvements to this hasher version without needing to upgrade the hasher version.
For example it will look for messages like "x is not a function" or "y is undefined" and will break on the variable name, creating a new group for each unique variable name.