Why Error Grouping Matters
Without error grouping, a single bug could generate thousands of individual error logs, making it impossible to:- Identify unique issues
- Prioritize critical bugs
- Understand error frequency
- Track resolution progress
How Error Grouping Works
VIJ uses fingerprinting to identify similar errors and group them together.Fingerprint Generation
A fingerprint is a unique hash generated from:- Error name - The error type (
TypeError,ReferenceError, etc.) - Normalized message - Error message with dynamic values removed
- Stack trace signature - Top 3-5 stack frames
Normalization Process
Dynamic values are normalized to create consistent fingerprints:- Numbers
- UUIDs
- Paths
- Timestamps
Stack Trace Fingerprinting
VIJ analyzes stack traces to identify the error’s origin:- Top frames show where the error originated
- Middle frames show the call path
- Bottom frames are usually library/framework code (less useful for grouping)
Grouping Algorithm
The complete fingerprinting algorithm:Viewing Error Groups
Groups Dashboard
Navigate to/groups to view all error groups:

- Error Message - Representative message from the group
- Count - Total occurrences
- First Seen - When this error first appeared
- Last Seen - Most recent occurrence
- Severity - Highest severity in the group
- Affected Apps - Which applications are impacted
- By count (most frequent first)
- By recency (most recent first)
- By first occurrence (oldest first)
- By severity (critical first)
Group Details
Click any group to see:- All occurrences - Every instance of this error
- Frequency chart - Error rate over time
- Affected users - If user metadata is attached
- Common metadata - Shared context across occurrences
Custom Grouping Strategies
VIJ supports custom grouping for specific use cases.Group by Metadata
Group errors by custom metadata fields:Manual Grouping
Override automatic grouping:Group by Environment
Separate errors by environment even if they’re the same:Grouping Configuration
Configure grouping behavior in VIJ Admin.Group Merge Rules
Define rules to merge groups:lib/grouping.ts
Stack Frame Filtering
Exclude certain files from fingerprinting:- Library code is the same across errors
- Focus on application-specific code
- More meaningful grouping
Group Size Limits
Configure maximum group sizes:Advanced Grouping Patterns
Similarity-Based Grouping
Group errors by similarity score:Machine Learning Grouping
Use ML to identify error patterns:ML-based grouping is an advanced feature not included in the default VIJ installation but can be implemented as a custom extension.
Grouping Best Practices
Use meaningful error messages
Use meaningful error messages
Good:Bad:Specific messages create better groups.
Include context in metadata, not messages
Include context in metadata, not messages
Good:Bad:Dynamic values in messages prevent proper grouping.
Use custom error classes
Use custom error classes
Review groups regularly
Review groups regularly
- Check for over-grouping (unrelated errors grouped together)
- Check for under-grouping (same error split into multiple groups)
- Adjust normalization rules as needed
- Archive resolved groups
Use environment-specific grouping
Use environment-specific grouping
Troubleshooting Grouping Issues
Errors not grouping as expected
Errors not grouping as expected
Symptom: Similar errors appearing as separate groupsCauses:
- Dynamic values in error messages
- Different stack traces
- Different error names
- Use consistent error messages
- Check stack trace consistency
- Use custom fingerprinting
- Review normalization rules
Too many groups
Too many groups
Symptom: Hundreds of small groups instead of a few large onesCauses:
- Unique error messages
- Different stack traces
- Over-specific fingerprinting
- Increase normalization (more aggressive pattern matching)
- Use custom grouping keys
- Merge related groups manually
- Reduce stack frame depth
Groups too large
Groups too large
Symptom: Single group with thousands of unrelated errorsCauses:
- Generic error messages (“Error”, “Something went wrong”)
- Over-aggressive normalization
- Missing stack traces
- Use specific error messages
- Include stack traces
- Add more context to fingerprints
- Split large groups manually
Groups merging incorrectly
Groups merging incorrectly
Symptom: Unrelated errors in the same groupCauses:
- Overly aggressive normalization
- Similar but different errors
- Missing stack frame information
- Reduce normalization
- Use custom fingerprinting
- Include more stack frames
- Use metadata for additional grouping