Skip to content

LogEventFingerprint

Viames Marino edited this page May 5, 2026 · 1 revision

Pair framework: LogEventFingerprint

Pair\Core\LogEventFingerprint generates a stable grouping key for persisted warning/error records.

The fingerprint is stored in LogEvent::fingerprint and can be used by dashboards or maintenance tools to group repeated failures.


Inputs

The generated hash is based on stable diagnostic fields:

  • severity level;
  • normalized log description;
  • exception class, file, and line when available;
  • request path.

The result is a SHA-256 hash string.


Normalization

Before hashing, variable values are normalized so repeated instances of the same failure group together more reliably.

The normalizer masks high-cardinality tokens such as:

  • UUIDs;
  • long hexadecimal hashes;
  • long numbers;
  • generic numeric fragments.

For example, two errors that differ only by an order ID or generated UUID should normally produce the same fingerprint.


Intended use

Use the fingerprint for grouping, deduplication, and triage views.

Do not use it as a security signature, integrity check, or unique event identifier. It is intentionally lossy because grouping is more useful than perfect uniqueness for operational diagnostics.

See also: DatabaseLogWriter, LogEvent, ErrorLog, Logger.

Clone this wiki locally