honeybadger 5.5.1 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/honeybadger/events_worker.rb +2 -2
- data/lib/honeybadger/plugins/active_job.rb +39 -23
- data/lib/honeybadger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fda24e6e314cb0c4d97567f6bd853fb2ea362a3f74811d3f678df5c6e29296b
|
4
|
+
data.tar.gz: 5277c9c0f5387299d254345b9b728d1699b5852bd3a9a63ce3ec7e6c22019546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81f8c10e7b6bbfa07ad527a713c32252281a3e190c76f708635cfbcb1c9758fb4a195b95576780f0a8181cf81110ea741d05365ccc0cc1404a08ca984b627266
|
7
|
+
data.tar.gz: 36c75e8ed8c8ed6efa638ef367f80d5fa79f9d718b87ebae77db081af629ce64deb36b81c4a3cb22e725b2b24eb9b3aedba1cdec5e33123dcaadff790f6f9b1a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [5.7.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.6.0...v5.7.0) (2024-03-12)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* add additional context to ActiveJob notifications ([#528](https://github.com/honeybadger-io/honeybadger-ruby/issues/528)) ([d6ae246](https://github.com/honeybadger-io/honeybadger-ruby/commit/d6ae246a24290d76bcd0c8deb9121707d88976fe))
|
9
|
+
|
10
|
+
## [5.6.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.5.1...v5.6.0) (2024-03-05)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* track exceptions in :solid_queue ([#526](https://github.com/honeybadger-io/honeybadger-ruby/issues/526)) ([4e2d428](https://github.com/honeybadger-io/honeybadger-ruby/commit/4e2d4287bbbe0100d6f82a38b7314fc8dc5a1571)), closes [#518](https://github.com/honeybadger-io/honeybadger-ruby/issues/518)
|
16
|
+
|
3
17
|
## [5.5.1](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.5.0...v5.5.1) (2024-02-26)
|
4
18
|
|
5
19
|
|
@@ -291,9 +291,9 @@ module Honeybadger
|
|
291
291
|
warn { sprintf('Event send failed: Payload is too large. code=%s', response.code) }
|
292
292
|
when 201
|
293
293
|
if throttle = dec_throttle
|
294
|
-
|
294
|
+
debug { sprintf('Success ⚡ Event sent code=%s throttle=%s interval=%s', response.code, throttle, throttle_interval) }
|
295
295
|
else
|
296
|
-
|
296
|
+
debug { sprintf('Success ⚡ Event sent code=%s', response.code) }
|
297
297
|
end
|
298
298
|
when :stubbed
|
299
299
|
info { sprintf('Success ⚡ Development mode is enabled; This event will be sent after app is deployed.') }
|
@@ -1,29 +1,45 @@
|
|
1
1
|
module Honeybadger
|
2
2
|
module Plugins
|
3
3
|
module ActiveJob
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
4
|
+
# Ignore inline and test adapters, as well as the adapters that we support with their own plugins
|
5
|
+
EXCLUDED_ADAPTERS = %i[inline test delayed_job faktory karafka resque shoryuken sidekiq sucker_punch].freeze
|
6
|
+
|
7
|
+
class << self
|
8
|
+
def perform_around(job, block)
|
9
|
+
Honeybadger.clear!
|
10
|
+
context = context(job)
|
11
|
+
block.call
|
12
|
+
rescue StandardError => e
|
13
|
+
Honeybadger.notify(e, context: context, parameters: { arguments: job.arguments })
|
14
|
+
raise e
|
15
|
+
end
|
16
|
+
|
17
|
+
def context(job) # rubocop:disable Metrics/MethodLength
|
18
|
+
{
|
19
|
+
component: job.class,
|
20
|
+
action: 'perform',
|
21
|
+
enqueued_at: job.try(:enqueued_at),
|
22
|
+
executions: job.executions,
|
23
|
+
job_class: job.class,
|
24
|
+
job_id: job.job_id,
|
25
|
+
priority: job.priority,
|
26
|
+
queue_name: job.queue_name,
|
27
|
+
scheduled_at: job.scheduled_at
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Plugin.register do
|
33
|
+
requirement do
|
34
|
+
defined?(::Rails.application) &&
|
35
|
+
::Rails.application.config.respond_to?(:active_job) &&
|
36
|
+
!EXCLUDED_ADAPTERS.include?(::Rails.application.config.active_job[:queue_adapter])
|
37
|
+
end
|
38
|
+
|
39
|
+
execution do
|
40
|
+
::ActiveJob::Base.set_callback(:perform, :around, &ActiveJob.method(:perform_around))
|
41
|
+
end
|
42
|
+
end
|
26
43
|
end
|
27
44
|
end
|
28
|
-
|
29
45
|
end
|
data/lib/honeybadger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.7.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-
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|