honeybadger-io / honeybadger-ruby

Ruby gem for reporting errors to honeybadger.io
https://docs.honeybadger.io/lib/ruby/
MIT License
251 stars 145 forks source link

fix: don't raise errors in instrumentation metrics #627

Closed roelbondoc closed 1 month ago

roelbondoc commented 1 month ago

Raising an error just because a value isn't specified is a little too aggressive. Instead, we can still register the metric and just log the issue. This should prevent unwanted exceptions from bubbling up into the application. We should also not send any metrics if no samples have been collected.

Before submitting a pull request, please make sure the following is done:

  1. If you've fixed a bug or added code that should be tested, add tests!
  2. Run rake spec in the repository root.
  3. Use a pull request title that conforms to conventional commits.