honeybadger 5.15.4 → 5.15.6

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: e02a98a2c03861bc6a34a783ed06bd0715986ebc533528ca2f96fab6baa12efb
4
- data.tar.gz: 56b993ee11bca44d5035e75bedebeafab92c526e43dacbeae5a9a365c0b271ef
3
+ metadata.gz: 8d3722362936e23146d764b01697b2f362bb075dc47ba3e9584e9c2314e1fd14
4
+ data.tar.gz: bab546c47690900af4dbb47878d92256c347b850aa36af2d92a0d1fb5e49a0fb
5
5
  SHA512:
6
- metadata.gz: 540df7f2914728534af986a1cab887e8867b48c106297ad3f0ae26d73eeeb402d239cc2f28aa1dd337224f020218ebaf5533f40cc2ebd8955734b025ae888e17
7
- data.tar.gz: '068b34fc9de350eedcb916897cebe1afbb8ca60ecb7368f25ae9f548427a9ded5d77dc2cf23e311e13886125e49de263ff1f818f8c939deb53c62d89217fe4eb'
6
+ metadata.gz: 6709ff4cd64ae219db6dcbbea4e112f3b8d1fd43387f1e54853407c29b6a61b9eb847e48018f8b7baa676d75e8b8b39b88ff14377eb9eae9c80b74cf4e66b20c
7
+ data.tar.gz: 87d67d78be4e550935436d1ebb9cda1374b504da192b81a01d42de504078065823cb287ab456065f9346774d3d73d8c2d945956e8f36d498a8e305862089b8be
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [5.15.6](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.5...v5.15.6) (2024-08-15)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * 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))
10
+
11
+ ## [5.15.5](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.4...v5.15.5) (2024-07-30)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * sanitize event payload data ([#602](https://github.com/honeybadger-io/honeybadger-ruby/issues/602)) ([f307212](https://github.com/honeybadger-io/honeybadger-ruby/commit/f307212cf9a3df43b8bacff1474c2f674ff3f1a3))
17
+
4
18
  ## [5.15.4](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.15.3...v5.15.4) (2024-07-29)
5
19
 
6
20
 
@@ -1,5 +1,7 @@
1
1
  require 'forwardable'
2
2
 
3
+ require 'honeybadger/util/sanitizer'
4
+
3
5
  module Honeybadger
4
6
  class Event
5
7
  extend Forwardable
@@ -47,10 +49,11 @@ module Honeybadger
47
49
  #
48
50
  # @return [Hash] JSON representation of the event.
49
51
  def as_json(*args)
50
- payload.tap do |p|
52
+ data = payload.tap do |p|
51
53
  p[:ts] = ts
52
54
  p[:event_type] = event_type if event_type
53
55
  end
56
+ Util::Sanitizer.sanitize(data)
54
57
  end
55
58
  end
56
59
  end
@@ -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
- # class TicketsController < ApplicationController
14
- # def create
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
- # # pass a lambda argument
19
- # Honeybadger.time 'create.ticket', ->{ Ticket.create(params[:ticket]) }
20
- #
21
- # # pass the duration argument
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 prvoide a cleaner interface.
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
- # class TicketsController < ApplicationController
11
- # include Honeybadger::InstrumentationHelper
12
+ # def create
13
+ # metric_source 'controller'
14
+ # metric_attributes { foo: 'bar' } # These attributes get tagged to all metrics called after.
12
15
  #
13
- # def create
14
- # metric_source 'controller'
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
- # # pass a block
18
- # time('create.ticket') { Ticket.create(params[:ticket]) }
19
+ # # pass a lambda argument
20
+ # time 'create.ticket', ->{ Ticket.create(params[:ticket]) }
19
21
  #
20
- # # pass a lambda argument
21
- # time 'create.ticket', ->{ Ticket.create(params[:ticket]) }
22
- #
23
- # # pass the duration argument
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 inline and test adapters, as well as the adapters that we support with their own plugins
7
- EXCLUDED_ADAPTERS = %i[inline test delayed_job faktory karafka resque shoryuken sidekiq sucker_punch]
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,7 +3,7 @@ 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
9
  ::Karafka.monitor.subscribe('error.occurred') do |event|
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '5.15.4'.freeze
3
+ VERSION = '5.15.6'.freeze
4
4
  end
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.15.4
4
+ version: 5.15.6
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-07-29 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email: