Last active
February 6, 2026 21:43
-
-
Save stympy/6440d636cfae0f163f210c322bb4728c to your computer and use it in GitHub Desktop.
Less-sensitive fingerprint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROJECT_ROOT = Regexp.new(/\A\[PROJECT_ROOT\]/) | |
| Honeybadger.configure do |config| | |
| config.before_notify do |notice| | |
| location = begin | |
| Hash(notice.parsed_backtrace.find { |l| PROJECT_ROOT.match(l[:file].to_s) } || notice.parsed_backtrace.first) | |
| rescue | |
| {} | |
| end | |
| notice.fingerprint = [ | |
| notice.error_class, | |
| notice.component, | |
| "#{location["file"]}:#{location["method"]}" | |
| ].join(':') | |
| end | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the update!