How events are grouped
Collector puts the events that share a fingerprint within a project into the same issue. Understanding how the fingerprint is computed explains why an error shows as one issue rather than a hundred, and what to do when the grouping isn't what you expect.
The rule
If the event doesn't bring a fingerprint of its own, Collector computes one:
- With frames from your code: the exception's type plus the module and function of every frame marked as yours (
in_app). Lines, files and dependency frames don't count, so a deploy that moves code around doesn't split an issue in two. - With frames, but none of them yours: the type and the top three frames.
- With no frames: the type, if any, and the message, with numbers, ids, UUIDs, hex values, quoted strings, PIDs and struct bodies replaced. So
user 4812 not foundanduser 99 not foundare the same issue.
What matters most: what your code is
Since rule 1 rests on the in_app frames, marking correctly which code is yours matters more than anything else. The SDKs decide it on their own with a sensible default, and each one lets you adjust it:
- Elixir: your own applications; the
:in_appoption picks others. See Elixir. - Node: whatever is outside
node_modules; theinAppPathsoption changes it. See Node. - Browser: scripts from your own origin; the
inAppUrlsoption adds others, such as your CDN. See Browser.
If you see issues that should be one, or one that mixes different errors, this is the first thing to check.
Minified code
In the browser, code is usually minified: without source maps, the fingerprint is computed from the minified functions, which change with every build. With the maps uploaded, frames group by their original file and function, and a new build doesn't split the issue.
Events that arrived before a release's maps were uploaded stay grouped by the minified code. When you upload the maps, Collector regroups those events; if that makes two issues match, it merges them. See Issues that merge.
Picking the fingerprint by hand
When you know better than the rule how to group, send a fingerprint of your own with the event: a list of strings. For example, ["payment-gateway", "timeout"] puts every payment gateway timeout into one issue, wherever it comes from. How to send it depends on the SDK; the field is in The event.