Bellwether.Fingerprint (bellwether v0.1.0)

Copy Markdown

Grouping for the otp Domain.

A Fingerprint is computed on the device, from the exception type and the stack frames that belong to the application's own code. Two properties make or break it, and both are easy to lose:

  • No line numbers. A line moves on every edit above it. Including one turns an unrelated code change into a fleet of new Issues for the same bug.
  • No sizes, no values. Shapes are taken with sizes: false, because binary(6) and binary(7) describe the same bug on different data.

The BEAM gives this away for free — module, function and arity, structured, with no symbols and no unwinding. It is the reason otp groups better than anything available natively.

Summary

Functions

A short, stable digest for grouping.

The human-readable string of/4 hashes. Kept public because a Fingerprint nobody can explain is a Fingerprint nobody trusts.

Types

kind()

@type kind() :: :error | :exit | :throw

opts()

@type opts() :: [own_apps: [atom()], frames: pos_integer()]

Functions

of(kind, reason, stacktrace, opts \\ [])

@spec of(kind(), term(), Exception.stacktrace(), opts()) :: String.t()

A short, stable digest for grouping.

signature(kind, reason, stacktrace, opts \\ [])

@spec signature(kind(), term(), Exception.stacktrace(), opts()) :: String.t()

The human-readable string of/4 hashes. Kept public because a Fingerprint nobody can explain is a Fingerprint nobody trusts.