honeybadger 5.15.5 → 5.16.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/README.md +1 -1
- data/lib/honeybadger/instrumentation.rb +10 -11
- data/lib/honeybadger/instrumentation_helper.rb +14 -17
- data/lib/honeybadger/plugins/active_job.rb +2 -2
- data/lib/honeybadger/plugins/karafka.rb +5 -4
- data/lib/honeybadger/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6674f1772ae54868a913de6f2acdb4286500ffc165e0d5f171b322da91776f3
|
4
|
+
data.tar.gz: f22eb1fb98c3482bce89bf493dd9de0d2316e6aaf8026a57c9046728e7162c41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 532f696d90a9d2ffb9343b5cf5a64bf3e2a38485360198d32b6d16a297819dd80dc58bdbca81a8b00da2a7c6e9a6cb1fafe7f77ee6b4f7cec586c0e726fabed2
|
7
|
+
data.tar.gz: 571036d50c716b884a2ea06cad05829ee182d6ee84a82a44b170fb030dc63d00e937afad62983d44eab64de3e2f9f94844c9c4d4aeaca9a1de6ebbec809056bb
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
3
|
|
4
|
+
## [5.16.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.6...v5.16.0) (2024-09-19)
|
5
|
+
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* 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))
|
10
|
+
|
11
|
+
## [5.15.6](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.5...v5.15.6) (2024-08-15)
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* init karafka plugin only if monitor is available ([#606](https://github.com/honeybadger-io/honeybadger-ruby/issues/606)) ([cb0f89c](https://github.com/honeybadger-io/honeybadger-ruby/commit/cb0f89cddd7f8ad4b977a3b8665d0d12a59300d1))
|
17
|
+
|
4
18
|
## [5.15.5](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.4...v5.15.5) (2024-07-30)
|
5
19
|
|
6
20
|
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[](https://github.com/honeybadger-io/honeybadger-ruby/actions/workflows/ruby.yml)
|
4
4
|
[](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](
|
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
|
|
@@ -9,20 +9,19 @@ module Honeybadger
|
|
9
9
|
# instance. There are three usage variations as show in the example below:
|
10
10
|
#
|
11
11
|
# @example
|
12
|
+
# class TicketsController < ApplicationController
|
13
|
+
# def create
|
14
|
+
# # pass a block
|
15
|
+
# Honeybadger.time('create.ticket') { Ticket.create(params[:ticket]) }
|
12
16
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# # pass a block
|
16
|
-
# Honeybadger.time('create.ticket') { Ticket.create(params[:ticket]) }
|
17
|
+
# # pass a lambda argument
|
18
|
+
# Honeybadger.time 'create.ticket', ->{ Ticket.create(params[:ticket]) }
|
17
19
|
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# duration = timing_method { Ticket.create(params[:ticket]) }
|
23
|
-
# Honeybadger.time 'create.ticket', duration: duration
|
20
|
+
# # pass the duration argument
|
21
|
+
# duration = timing_method { Ticket.create(params[:ticket]) }
|
22
|
+
# Honeybadger.time 'create.ticket', duration: duration
|
23
|
+
# end
|
24
24
|
# end
|
25
|
-
# end
|
26
25
|
#
|
27
26
|
#
|
28
27
|
class Instrumentation
|
@@ -2,31 +2,28 @@ require 'honeybadger/instrumentation'
|
|
2
2
|
|
3
3
|
module Honeybadger
|
4
4
|
# +Honeybadger::InstrumentationHelper+ is a module that can be included into any class. This module
|
5
|
-
# provides a convenient DSL around the instrumentation methods to
|
5
|
+
# provides a convenient DSL around the instrumentation methods to provide a cleaner interface.
|
6
6
|
# There are three usage variations as show in the example below:
|
7
7
|
#
|
8
8
|
# @example
|
9
|
+
# class TicketsController < ApplicationController
|
10
|
+
# include Honeybadger::InstrumentationHelper
|
9
11
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
+
# def create
|
13
|
+
# metric_source 'controller'
|
14
|
+
# metric_attributes(foo: 'bar') # These attributes get tagged to all metrics called after.
|
12
15
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# metric_attributes { foo: 'bar' } # These attributes get tagged to all metrics called after.
|
16
|
+
# # pass a block
|
17
|
+
# time('create.ticket') { Ticket.create(params[:ticket]) }
|
16
18
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
+
# # pass a lambda argument
|
20
|
+
# time 'create.ticket', ->{ Ticket.create(params[:ticket]) }
|
19
21
|
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
# duration = timing_method { Ticket.create(params[:ticket]) }
|
25
|
-
# time 'create.ticket', duration: duration
|
22
|
+
# # pass the duration argument
|
23
|
+
# duration = timing_method { Ticket.create(params[:ticket]) }
|
24
|
+
# time 'create.ticket', duration: duration
|
25
|
+
# end
|
26
26
|
# end
|
27
|
-
# end
|
28
|
-
#
|
29
|
-
#
|
30
27
|
module InstrumentationHelper
|
31
28
|
|
32
29
|
# returns two parameters, the first is the duration of the execution, and the second is
|
@@ -3,8 +3,8 @@ require 'honeybadger/notification_subscriber'
|
|
3
3
|
module Honeybadger
|
4
4
|
module Plugins
|
5
5
|
module ActiveJob
|
6
|
-
# Ignore
|
7
|
-
EXCLUDED_ADAPTERS = %i[
|
6
|
+
# Ignore the adapters that we support with their own plugins
|
7
|
+
EXCLUDED_ADAPTERS = %i[delayed_job faktory karafka resque shoryuken sidekiq sucker_punch]
|
8
8
|
|
9
9
|
class << self
|
10
10
|
def perform_around(job, block)
|
@@ -3,12 +3,12 @@ require 'honeybadger/plugin'
|
|
3
3
|
module Honeybadger
|
4
4
|
module Plugins
|
5
5
|
Plugin.register :karafka do
|
6
|
-
requirement { defined?(::Karafka) }
|
6
|
+
requirement { defined?(::Karafka) && ::Karafka.respond_to?(:monitor) }
|
7
7
|
|
8
8
|
execution do
|
9
|
-
::Karafka.monitor.subscribe(
|
9
|
+
::Karafka.monitor.subscribe("error.occurred") do |event|
|
10
10
|
Honeybadger.notify(event[:error])
|
11
|
-
Honeybadger.event(
|
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(
|
26
|
+
Honeybadger.event("consumer.consumed.karafka", context)
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
data/lib/honeybadger/version.rb
CHANGED
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.
|
4
|
+
version: 5.16.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-
|
12
|
-
dependencies:
|
11
|
+
date: 2024-09-19 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
|