Provenance
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

StrategyAlgorithmBest For
stack (default)SHA-256 of top non-library stack frame (file + function + line)Most apps — groups same error at same code location
messageSHA-256 of error messageDynamic stack traces, message-based grouping
customYou provide the fingerprint valueFull control over grouping

Stack Strategy (Default)

The stack strategy:

  1. Parses the error's stack trace into frames
  2. Filters out library frames (node_modules/, internal/)
  3. Takes the top application frame (file + function + line number)
  4. 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.