How do I group errors my own way?

Send a fingerprint with the error from the Sentry SDK. Monitoring puts every event with the same fingerprint in one issue and ignores the stack and message for it. Set it on one call to Sentry.captureException, inside a scope, or for every event in beforeSend. Leave out {{ default }}, because a fingerprint that contains it is ignored.

Last updated 26 November 2026. By Paul Badarau.

Mei, a fictional developer, runs a recipe site with a hosted payment form. When the payment script times out, the error comes from a different place in her code each time, so Monitoring has opened 12 issues for one problem. She wants them in a single issue called payment-timeout.

  1. Pick a name that describes the failure and stays the same for every event. A part that changes per event, such as an order number or a time, makes a new issue every time.
  2. For an error you catch, pass the fingerprint with the call: Sentry.captureException(error, { fingerprint: ['payment-timeout'] }).
  3. For several calls in one block, set it on a scope: Sentry.withScope(scope => { scope.setFingerprint(['payment-timeout']); Sentry.captureException(error); }).
  4. For errors you do not catch, set it in beforeSend in Sentry.init. Look at the exception, set event.fingerprint when it matches, and return the event.
  5. To split one issue into several, add parts. ['api-error', 'cart', '502'] and ['api-error', 'cart', '504'] are two issues.

Monitoring reads up to 16 parts, each up to 256 characters, and every part must be a string. If one part is not a string, the fingerprint is ignored and the stack or message decides. Some setups add {{ default }} to a fingerprint to extend the usual grouping. Monitoring does not combine the two: a fingerprint that contains {{ default }} is ignored as a whole.

A fingerprint decides where new events go. Events already stored keep the issue they joined, so Mei's 12 old issues stay as they are. They drop off the Errors list once they have no events in the period you are looking at, and each one is removed 30 days after it was last seen. The new payment-timeout issue counts as new, so Owners and Administrators get the new-issue email for it the first time it appears.

The product page for this is Monitoring.

Start your 14-day free trial