Error Tracking
Fingerprinting
How errors are grouped into issues using fingerprint strategies
Fingerprinting
Fingerprints determine how individual error events are grouped into error issues. Two errors with the same fingerprint are considered the same issue — their event count increments rather than creating a new issue.
Strategies
| Strategy | Algorithm | Best For |
|---|---|---|
stack (default) | SHA-256 of top non-library stack frame (file + function + line) | Most apps — groups same error at same code location |
message | SHA-256 of error message | Dynamic stack traces, message-based grouping |
custom | You provide the fingerprint value | Full control over grouping |
Stack Strategy (Default)
The stack strategy:
- Parses the error's stack trace into frames
- Filters out library frames (
node_modules/,internal/) - Takes the top application frame (file + function + line number)
- Computes SHA-256 hash, truncated to 32 characters
This means the same error thrown at the same location in your code always produces the same fingerprint, regardless of the error message content.
Message Strategy
The message strategy simply hashes the error message. Useful when:
- Stack traces are unreliable (minified code without source maps)
- You want to group by error message regardless of where it's thrown
- The error message is stable and descriptive
Custom Fingerprint
Pass an explicit fingerprint to captureException():
provenance.captureException(error, {
fingerprint: 'payment-gateway-timeout',
});This gives you full control. Use it for:
- Grouping related errors that have different stack traces
- Splitting errors that share a stack trace but have different causes
- Business-logic grouping (e.g., by customer, by feature)
Configuration
Set the fingerprinting strategy per origin in the origin config:
{
"errorTracking": {
"enabled": true,
"fingerprinting": "stack"
}
}The SDK reads this from the origin config and applies it automatically.