Documentation - Raygun4JavaScript - JS Error Handling & Reporting

Version 1

Initial release.

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.ClassName and Error.Message, plus the Error.StackTrace frames.

The FileName and 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.

Version 2

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.

Version 3

Same as Version 2, but groups on the message if the stack trace is null, or an empty array.

Version 4

Same as Version 3, but improves grouping for AJAX errors by stripping the value extracted from url within 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. '' and '' 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.

Version 5

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.

Version 6

Improve stripping of hexidecimal segments from filenames. This means JavaScript files which are cache busted via identifiers within the filename will be treated the same by grouping code.

Eg. myappcode.1fde0bda54c.js and myappcode.36ee0bda4c.js will be treated as the same file when determining the error group.

Version 7

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 unqieu variable name.

Documentation missing?

If we don't have documentation about your desired topic, send us a message and we'll create it for you.