honeybadger 5.15.6 → 5.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d3722362936e23146d764b01697b2f362bb075dc47ba3e9584e9c2314e1fd14
4
- data.tar.gz: bab546c47690900af4dbb47878d92256c347b850aa36af2d92a0d1fb5e49a0fb
3
+ metadata.gz: c9c6c96b4525b6497fd3376651cab2d8f4aadaee94bd6b44ea7c7e0f29db16af
4
+ data.tar.gz: 03e4454abbe0c2c0fe3c00ed36b08208e778955af16d73b1d18d7be10f8c5309
5
5
  SHA512:
6
- metadata.gz: 6709ff4cd64ae219db6dcbbea4e112f3b8d1fd43387f1e54853407c29b6a61b9eb847e48018f8b7baa676d75e8b8b39b88ff14377eb9eae9c80b74cf4e66b20c
7
- data.tar.gz: 87d67d78be4e550935436d1ebb9cda1374b504da192b81a01d42de504078065823cb287ab456065f9346774d3d73d8c2d945956e8f36d498a8e305862089b8be
6
+ metadata.gz: 1e05a64d8163974c1de5afc9df5db1cfc798076cccb09859f3e734d34a419f8bf03c3eac5ca89510d30c443677b3ca86a2fb58fc3b0643b77c71f3b08d3df651
7
+ data.tar.gz: 5678d4ff50a14f8d9f63d17443b96c36ecaa93362ecb7412c01bc4a24600700f336056f4960e56376e9195aafc42b9a4e1187d761b6d508fc09d651507dead02
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [5.17.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.16.0...v5.17.0) (2024-10-22)
5
+
6
+
7
+ ### Features
8
+
9
+ * add request_id to notices ([#619](https://github.com/honeybadger-io/honeybadger-ruby/issues/619)) ([fa4d878](https://github.com/honeybadger-io/honeybadger-ruby/commit/fa4d878ad0f0a5c37e49adeab1c53e6ffa463295)), closes [#616](https://github.com/honeybadger-io/honeybadger-ruby/issues/616)
10
+
11
+ ## [5.16.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.6...v5.16.0) (2024-09-19)
12
+
13
+
14
+ ### Features
15
+
16
+ * add karafka processing_lag to event ([#613](https://github.com/honeybadger-io/honeybadger-ruby/issues/613)) ([a527eea](https://github.com/honeybadger-io/honeybadger-ruby/commit/a527eea37eb3d351dd6731ea3c469dcb2609fea6))
17
+
4
18
  ## [5.15.6](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.5...v5.15.6) (2024-08-15)
5
19
 
6
20
 
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Ruby](https://github.com/honeybadger-io/honeybadger-ruby/actions/workflows/ruby.yml/badge.svg)](https://github.com/honeybadger-io/honeybadger-ruby/actions/workflows/ruby.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/honeybadger.svg)](http://badge.fury.io/rb/honeybadger)
5
5
 
6
- This is the notifier gem for integrating apps with the :zap: [Honeybadger Exception Notifier for Ruby and Rails](http://honeybadger.io).
6
+ This is the notifier gem for integrating apps with the :zap: [Honeybadger Exception Notifier for Ruby and Rails](https://www.honeybadger.io).
7
7
 
8
8
  When an uncaught exception occurs, Honeybadger will POST the relevant data to the Honeybadger server specified in your environment.
9
9
 
@@ -149,6 +149,7 @@ module Honeybadger
149
149
  opts[:rack_env] ||= context_manager.get_rack_env
150
150
  opts[:global_context] ||= context_manager.get_context
151
151
  opts[:breadcrumbs] ||= breadcrumbs.dup
152
+ opts[:request_id] ||= context_manager.get_request_id
152
153
 
153
154
  notice = Notice.new(config, opts)
154
155
 
@@ -34,6 +34,7 @@ module Honeybadger
34
34
  IGNORE_EVENTS_DEFAULT = [
35
35
  { event_type: 'sql.active_record', query: /^(begin|commit)( transaction)?$/i },
36
36
  { event_type: 'sql.active_record', query: /(solid_queue|good_job)/i },
37
+ { event_type: 'sql.active_record', name: /^GoodJob/ },
37
38
  { event_type: 'process_action.action_controller', controller: 'Rails::HealthController' }
38
39
  ].freeze
39
40
 
@@ -11,7 +11,7 @@ module Honeybadger
11
11
  #
12
12
  # def create
13
13
  # metric_source 'controller'
14
- # metric_attributes { foo: 'bar' } # These attributes get tagged to all metrics called after.
14
+ # metric_attributes(foo: 'bar') # These attributes get tagged to all metrics called after.
15
15
  #
16
16
  # # pass a block
17
17
  # time('create.ticket') { Ticket.create(params[:ticket]) }
@@ -144,6 +144,9 @@ module Honeybadger
144
144
  # Custom details data
145
145
  attr_accessor :details
146
146
 
147
+ # The ID of the request which caused this notice.
148
+ attr_accessor :request_id
149
+
147
150
  # The parsed exception backtrace. Lines in this backtrace that are from installed gems
148
151
  # have the base path for gem installs replaced by "[GEM_ROOT]", while those in the project
149
152
  # have "[PROJECT_ROOT]".
@@ -213,13 +216,14 @@ module Honeybadger
213
216
  self.api_key = opts[:api_key] || config[:api_key]
214
217
  self.tags = construct_tags(opts[:tags]) | construct_tags(context[:tags])
215
218
 
216
- self.url = opts[:url] || request_hash[:url] || nil
217
- self.action = opts[:action] || request_hash[:action] || nil
218
- self.component = opts[:controller] || opts[:component] || request_hash[:component] || nil
219
- self.params = opts[:parameters] || opts[:params] || request_hash[:params] || {}
220
- self.session = opts[:session] || request_hash[:session] || {}
221
- self.cgi_data = opts[:cgi_data] || request_hash[:cgi_data] || {}
222
- self.details = opts[:details] || {}
219
+ self.url = opts[:url] || request_hash[:url] || nil
220
+ self.action = opts[:action] || request_hash[:action] || nil
221
+ self.component = opts[:controller] || opts[:component] || request_hash[:component] || nil
222
+ self.params = opts[:parameters] || opts[:params] || request_hash[:params] || {}
223
+ self.session = opts[:session] || request_hash[:session] || {}
224
+ self.cgi_data = opts[:cgi_data] || request_hash[:cgi_data] || {}
225
+ self.details = opts[:details] || {}
226
+ self.request_id = opts[:request_id] || nil
223
227
 
224
228
  self.session = opts[:session][:data] if opts[:session] && opts[:session][:data]
225
229
 
@@ -261,6 +265,9 @@ module Honeybadger
261
265
  stats: stats,
262
266
  time: now,
263
267
  pid: pid
268
+ },
269
+ correlation_context: {
270
+ request_id: s(request_id)
264
271
  }
265
272
  }
266
273
  end
@@ -6,9 +6,9 @@ module Honeybadger
6
6
  requirement { defined?(::Karafka) && ::Karafka.respond_to?(:monitor) }
7
7
 
8
8
  execution do
9
- ::Karafka.monitor.subscribe('error.occurred') do |event|
9
+ ::Karafka.monitor.subscribe("error.occurred") do |event|
10
10
  Honeybadger.notify(event[:error])
11
- Honeybadger.event('error.occurred', error: event[:error]) if config.load_plugin_insights?(:karafka)
11
+ Honeybadger.event("error.occurred.karafka", error: event[:error]) if config.load_plugin_insights?(:karafka)
12
12
  end
13
13
 
14
14
  if config.load_plugin_insights?(:karafka)
@@ -19,10 +19,11 @@ module Honeybadger
19
19
  id: event.payload[:caller].id,
20
20
  topic: event.payload[:caller].messages.metadata.topic,
21
21
  messages_count: event.payload[:caller].messages.metadata.size,
22
+ processing_lag: event.payload[:caller].messages.metadata.processing_lag,
22
23
  partition: event.payload[:caller].messages.metadata.partition
23
24
  }
24
25
 
25
- Honeybadger.event('consumer.consumed.karafka', context)
26
+ Honeybadger.event("consumer.consumed.karafka", context)
26
27
  end
27
28
  end
28
29
  end
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '5.15.6'.freeze
3
+ VERSION = '5.17.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.15.6
4
+ version: 5.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-15 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logger
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: Make managing application errors a more pleasant experience.
14
28
  email:
15
29
  - support@honeybadger.io
@@ -179,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
193
  - !ruby/object:Gem::Version
180
194
  version: '0'
181
195
  requirements: []
182
- rubygems_version: 3.5.3
196
+ rubygems_version: 3.5.16
183
197
  signing_key:
184
198
  specification_version: 4
185
199
  summary: Error reports you can be happy about.