Module: Beacon::Fingerprint

Defined in:
lib/beacon/fingerprint.rb

Overview

Fingerprint algorithm — normative, see .doc/definition/06-http-api.md.

SHA1("<exception_class>|<first_app_frame_path>")

Line numbers are intentionally excluded so cosmetic edits above the failing line don’t shatter grouping across deploys.

Constant Summary collapse

LINE_SUFFIX =
/:\d+\z/.freeze

Class Method Summary collapse

Class Method Details

.compute(exception_class, first_app_frame) ⇒ Object



11
12
13
14
# File 'lib/beacon/fingerprint.rb', line 11

def self.compute(exception_class, first_app_frame)
  path = first_app_frame.to_s.sub(LINE_SUFFIX, "")
  Digest::SHA1.hexdigest("#{exception_class}|#{path}")
end