Welcome to Highlight
Getting Started
Overview
Backend SDK
Overview
Express Backend
Go Backend
Next.js Backend
Node.js Backend
Client SDK
Angular
Overview
Gatsby.js
HTML
Next.js
Other
React.js
Shopify
Squarespace
SvelteKit
Vue.js
Webflow
WordPress
Next.js SDK
Highlight()
Metrics
nope
Overview
withHighlightConfig()
Tips
Content-Security-Policy
Local Development
Monkey Patches
Performance Impact
Proxying Highlight
Session Search Deep Linking
Troubleshooting
Upgrading Highlight
Session Replay
Console Messages
HTML iframe Recording
Identifying Users
Live Mode
Network DevTools
Privacy
Rage Clicks
Recording Network Requests and Responses
Session Sharing
Session Shortcut
Tracking Events
Versioning Sessions
Error Monitoring
Grouping Errors
Sourcemaps
Versioning Errors
Product Features
Alerts
Analytics
Canvas
Comments
Environments
Frontend Observability
Keyboard Shortcuts
Performance Data
Segments
Session Search
Team Management
User Feedback
Web Vitals
WebGL
Integrations
Amplitude Integration
Clearbit Integration
Electron Integration
Front Plugin
Intercom Integration
Linear Integration
Mixpanel Integration
React.js Integration
Segment Integration
Sentry Integration
Slack Integration
Vercel Integration
highlight.run Changelog
5.0.0
Menu
Docs / Error Monitoring / Grouping Errors

Grouping Errors

Highlight groups errors together based on their error message and stack trace. When an error is thrown, Highlight finds the closest matching error and adds the new error instance to it.

An error is matched if:

  1. It has the same error message OR

  2. It has the same top stack frame and 3 of the next 4 stack frames are the same (in any order)

A stack frame is matched if:

  1. It has the same filename, function name, line number, and column number OR

  2. It has the same source code and context (if sourcemaps are enabled)

If there is no match with an existing error, a new error is created instead.

All error instances and their relevant sessions can be viewed in the panel at the bottom-right of the errors page:

Grouping Rules

If your errors are in JSON form, you can add JSONPath expressions in your project settings to select parts of your errors that you want to group on. For example, if your errors look like:

{ "type": "StackOverflowError", "user": "alice", "message": "Oh no! You got an error on line 41!!" } { "type": "StackOverflowError", "user": "bob", "message": "Oh no! You got an error on line 50!!" }
Copy

They would not be grouped together since the errors are not an exact match and since they were thrown at different lines in your code. In this case, if you wanted to group all errors of the same type into the same error group, you can add an expression $.type in your project settings.