Skip to main content
Grouping rules set the fingerprint, and so the issue, of new error events. Squasher checks the rules of a project in order. The first enabled rule that matches and can act sets the fingerprint. Existing issues keep their fingerprint. See Grouping rules for the conditions, the actions, and the template placeholders.

Operations

List the rules

position is the evaluation order, 0 first. limit is the most rules the project can have. For a merge_into rule, merge_into has the issue_id, the short_id, and the fingerprint of the target issue.

Add a rule

The response has status 201 and the new rule in rule. The rule applies to new error events within about a minute.

Change a rule

Send only the fields that change. Fields of match merge with the saved conditions. To remove a condition, set it to null.
The response has the changed rule in rule.

Remove a rule

The response is { "deleted": true }. New events then group by the next matching rule, or by the default fingerprint.

Preview rules

The preview groups recent error events again and writes nothing. Without rules, it uses the saved rules. With rules, it uses those drafts, in order, instead of the saved rules.
A draft without id is named draft-<index>. changed_events counts the events whose fingerprint would differ from the one they have. current_fingerprints lists the fingerprints that the events of a group have today. existing_issue is the issue that already has the group’s fingerprint, or null when the rule would start a new issue. A group with rule_id: null uses the default fingerprint.

Suggest a rule for similar errors

The suggestion drafts a merge_into rule that sends new errors like one issue into that issue. Use it to ignore or mute similar errors together with the issue: an ignored or muted issue keeps its status, and its new events start no alert. The suggestion writes nothing. The draft matches the error type of the issue and a message pattern. Squasher writes the pattern from the first line of the issue message: UUIDs, hex strings, and numbers become wildcards, and the rest is escaped. The pattern starts with ^. It ends with $ when it fits in 256 characters; a longer message gives a pattern that matches its start. The pattern uses only syntax that RE2 and JavaScript read the same way.
Edit rule if necessary, try it with the preview, then send it to groupingRules.create. position: 0 puts the rule first, so it acts before other rules.

Errors

TypeScript client and CLI

The CLI also has squasher grouping-rules create, update, and delete. For their flags, see the CLI reference.