How errors are grouped
One bug can throw thousands of times. Ottertrail puts all occurrences of one bug in one group, and the Errors page lists groups, not single errors. Each group has a fingerprint, worked out by Ottertrail when the error arrives. A sender cannot set it.
What the fingerprint uses
Section titled “What the fingerprint uses”Occurrences with the same fingerprint are one group. The fingerprint uses three things:
- The type, such as
TypeError. - The message, without the parts that change from one occurrence to the next:
- UUIDs, and hex IDs of 8 characters or more, count as one value.
- URLs count as one value.
- Numbers of 4 digits or more count as one value. Shorter numbers stay, because a status such as
404or500often tells two failures apart. - Runs of spaces count as one space.
- The file of the stack’s top frame, without its origin, query string, fragment, and the content hash that bundlers put in file names. So
index-BfK3x9A2.jsandindex-C7d1e0F4.jsare the same file.
So Order 51234 failed and Order 51288 failed are one group, and Request failed with status 404 and Request failed with status 500 are two.
Why function names and line numbers are left out
Section titled “Why function names and line numbers are left out”In minified code, function names and line numbers change with every build. If the fingerprint used them, each release would start new groups for old bugs, and a bug you resolved would come back as a new error after each deploy.
This has a cost:
- Two different bugs with the same type and message, in the same file, share a group.
- Source maps do not change the grouping. They show your own files and lines on the error’s page, but the fingerprint still uses the stack as the browser reported it.
One bug in two browsers
Section titled “One bug in two browsers”Browser engines word the same failure in different ways. For the same bug, Chrome reports Cannot read properties of undefined (reading 'total'), and Safari reports undefined is not an object (evaluating 'cart.total'). The messages differ, so one bug makes one group for each engine. Resolve each group when you fix the bug.
Server stacks
Section titled “Server stacks”Exceptions from your servers are grouped by the same rule. Ottertrail reads the top frame from stacks of Node.js, Python, Ruby, Go, Java and other JVM languages, and .NET. The top frame is where the exception was raised:
- For Java and other JVM languages, Ottertrail uses the class (such as
com.example.shop.CartService) in place of the file, because a file name such asCartService.javacan be the same in every package. - For .NET, it uses the file when the build kept it, and otherwise the type.
- For Go, it skips the frames of the Go runtime and of OpenTelemetry.
A server’s frame keeps the path that its runtime gives it. So a different build path, or a new version of a library (such as …/python3.12/site-packages/…), can start a new group for the same error. See Server errors.
Versions of the rule
Section titled “Versions of the rule”Each fingerprint starts with the number of the rule that made it, 1- today. If the rule changes, the new rule gets a new number. Old and new groups never mix, and old occurrences stay in the groups they were given.
Planned: grouping by the original files and functions that source maps give. This is not available yet.