Error Groups
Errors grouped by cause, with one incident for every new, returning or spiking error.
Incidion groups error and critical log lines by their cause, so a thousand lines of the same bug are one group instead of a thousand lines to read, and every new bug can open its own incident without a search term or an alert rule per error.
[Send Order to Zapier] Failed to send order 261016023003 to Zapier. Status code: 404
[Send Order to Zapier] Failed to send order 261016175970 to Zapier. Status code: 404
-> one group: [Send Order to Zapier] Failed to send order <n> to Zapier. Status code: 404
Groups are in the web dashboard under Observe > Error groups (or Groups in the log explorer) and in the app’s Logs tab under Groups.
How lines are grouped
Every error and critical line gets a fingerprint when it arrives. Lines with the same fingerprint form a group. The fingerprint comes from, first match wins:
attributes.fingerprint, if you send one (a string or a list of strings): you decide the grouping- the stack trace: the error type and the innermost frames of your own code (file and function, without line numbers; library frames are skipped). Python, JavaScript and Java traces are understood.
- the error type and the error message
- the message
The service is always part of the fingerprint. Parts that change between occurrences are masked: ids, UUIDs, long numbers, timestamps, URLs, e-mail and IP addresses and long quoted text. Short numbers such as HTTP status codes stay, so a 404 and a 500 are two groups.
Only lines that arrive after a group’s settings are in place are grouped that way; lines stored earlier keep their group.
Working with groups
- Resolve a group once the bug is fixed. If it comes back, it is open again and marked Back.
- Ignore a group you do not want to hear about; it never opens an incident.
- Merge groups that are the same bug (select them, then Merge into…). Their lines count for the group you merge into. Split off undoes it.
- Show all lines opens the logs filtered to the group (
error_groupfilter of the logs API).
Members, admins and owners can change groups; viewers can look at them.
Incidents for new errors
Every new project has the alert rule New errors. It opens one incident per group that is:
- new: first seen in the last 24 hours, with at least Fire at lines (default 3) in the window (default 5 minutes)
- back: a resolved group that has lines again
- spiking: at least Spike at lines (default 100) in the window
A new group opens an incident once, a returning group once per return. The incident resolves itself when the group has had no lines for Resolve after (default 30 minutes). When more than five groups fire at once, for example after a broken deploy, they open one incident together instead of one each.
The incident pages people like any other incident (on-call schedule, escalation policy, or all owners, admins and members). The rule needs no channels; add some (Slack, e-mail, …) to be told there as well.
Projects created before error groups existed turn the rule on in the project settings (Error grouping > Turn on). Edit it under Alert rules like any rule, for example Fire at 1 to open an incident on the first line of a new error. The New errors rule does not count against your plan’s log and metric alert rules. More rules of this kind (type log_error_group, see Alert Rules) do.
Grouping settings
Admins and owners tune the grouping per project under Project settings > Error grouping:
- Granularity: coarse masks every number and all quoted text (fewer, broader groups), normal is the default, fine masks only ids and timestamps (more, narrower groups)
- Rules: up to 20 one-word patterns that are always masked or never masked, with
*as a wildcard, for example masktenant=*or keepbuild-*
Changes apply to new lines within a minute.
Set the fingerprint yourself
To group by your own key, send it in the attributes:
{
"level": "error",
"message": "Payment failed for order 1234",
"attributes": { "fingerprint": "payment-declined" }
}
API
| Method | Path | |
|---|---|---|
| GET | /projects/{id}/error-groups/ |
Groups (status: open, resolved, ignored, all; service, q, sort: last_seen, first_seen, count) |
| GET | /projects/{id}/error-groups/{group_id}/ |
One group with its newest lines and 24 hours of counts |
| POST | /projects/{id}/error-groups/{group_id}/resolve/, ignore/, reopen/ |
Change the status |
| POST | /projects/{id}/error-groups/{group_id}/merge/ |
Merge {"group_ids": [...]} into this group |
| POST | /projects/{id}/error-groups/{group_id}/unmerge/ |
Split a merged group off |
| GET, PATCH | /projects/{id}/error-grouping/ |
Grouping settings |
| POST | /projects/{id}/error-grouping/default-rule/ |
Create the New errors rule |