-
Notifications
You must be signed in to change notification settings - Fork 2
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.
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.
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.
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.