honeybadger 5.19.0 → 5.19.2

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: bf4c3296c72440877caccd2ada861f4060af897ed517688fb838cd57ae0a58ff
4
- data.tar.gz: 25d45250d1f2d2b0fadfa37637446316f12588f3dd134695803c3a068a0513d8
3
+ metadata.gz: 20909b3d33ea742bea8ebf66e119cd76e1db5bd57d1fe0a83ea15a997ff5c23c
4
+ data.tar.gz: acc73eea6c152b3a4f0bda2667ab29975ca8b95cb91109d26c85795b5a9ea6a7
5
5
  SHA512:
6
- metadata.gz: 3c66b0c6fa819e716b18a710c1e11fe8c95d25e06ca69216efb93fb2d4bffd1d65c46e7b00b658c0321ac6608817dec2c894eb68bcc0bf39da858c37c0b96302
7
- data.tar.gz: 6ef30a79138840ade5fef06ef5771f96c4a94ea942b6154b322632f73d71f8c72745be940e25c6aa19187411897c528e5f3e0325c3605cce0861cc4a6aa73a9b
6
+ metadata.gz: c5ac6182c0b8ef252f81ddb54ef89dc2c6cd65313601acfd404fcf60832efcc67115964395573642149c4bac08940ce4258014be032df559125ce779d487d622
7
+ data.tar.gz: 5494eba2f9590c809cf3263b5c373ac9f0bcd97dfb34ac1e602979e7412632758f4f1b4ce359e382b31d1ee3921357ae7390f88a9fdb9b81dbfeaff01de56708
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [5.19.2](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.19.1...v5.19.2) (2024-11-05)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * don't run middleware in Sinatra when not configured ([#629](https://github.com/honeybadger-io/honeybadger-ruby/issues/629)) ([d84c2b1](https://github.com/honeybadger-io/honeybadger-ruby/commit/d84c2b15f61b1a019be6329981d8f5323115d1e9))
10
+ * pin rspec-its gem to 1.3.1 ([#631](https://github.com/honeybadger-io/honeybadger-ruby/issues/631)) ([5f78b8a](https://github.com/honeybadger-io/honeybadger-ruby/commit/5f78b8adfb1b86c233bf9ad3ddb69dc702341e11))
11
+
12
+ ## [5.19.1](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.19.0...v5.19.1) (2024-11-02)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * don't raise errors in instrumentation metrics ([#627](https://github.com/honeybadger-io/honeybadger-ruby/issues/627)) ([1231dae](https://github.com/honeybadger-io/honeybadger-ruby/commit/1231dae0c48a2fab4cdaa14f7308ab3e0b44c287))
18
+
4
19
  ## [5.19.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.18.0...v5.19.0) (2024-10-29)
5
20
 
6
21
 
@@ -31,8 +31,8 @@ module Honeybadger
31
31
  if config[:'exceptions.enabled']
32
32
  # These two must come before the ErrorNotifier, since an error/response
33
33
  # passes through middleware from inner to outer (bottom to top)
34
- install_honeybadger_middleware(Honeybadger::Rack::UserFeedback)
35
- install_honeybadger_middleware(Honeybadger::Rack::UserInformer)
34
+ install_honeybadger_middleware(Honeybadger::Rack::UserFeedback) if config[:'feedback.enabled']
35
+ install_honeybadger_middleware(Honeybadger::Rack::UserInformer) if config[:'user_informer.enabled']
36
36
  install_honeybadger_middleware(Honeybadger::Rack::ErrorNotifier)
37
37
  end
38
38
  end
@@ -57,10 +57,12 @@ module Honeybadger
57
57
  value = attributes.delete(:duration) || attributes.delete(:value)
58
58
  end
59
59
 
60
- raise 'No value found' if value.nil?
61
-
62
60
  Honeybadger::Timer.register(registry, name, attributes).tap do |timer|
63
- timer.record(value)
61
+ if value.nil?
62
+ agent.config.logger.warn("No value found for timer #{name}. Must specify either duration or value. Skipping.")
63
+ else
64
+ timer.record(value)
65
+ end
64
66
  end
65
67
  end
66
68
 
@@ -77,10 +79,12 @@ module Honeybadger
77
79
  value = attributes.delete(:duration) || attributes.delete(:value)
78
80
  end
79
81
 
80
- raise 'No value found' if value.nil?
81
-
82
82
  Honeybadger::Histogram.register(registry, name, attributes).tap do |histogram|
83
- histogram.record(value)
83
+ if value.nil?
84
+ agent.config.logger.warn("No value found for histogram #{name}. Must specify either duration or value. Skipping.")
85
+ else
86
+ histogram.record(value)
87
+ end
84
88
  end
85
89
  end
86
90
 
@@ -134,7 +138,11 @@ module Honeybadger
134
138
  end
135
139
 
136
140
  Honeybadger::Gauge.register(registry, name, attributes).tap do |gauge|
137
- gauge.record(value)
141
+ if value.nil?
142
+ agent.config.logger.warn("No value found for gauge #{name}. Must specify value. Skipping.")
143
+ else
144
+ gauge.record(value)
145
+ end
138
146
  end
139
147
  end
140
148
 
@@ -19,6 +19,7 @@ module Honeybadger
19
19
 
20
20
  def call
21
21
  @registry.metrics.each do |metric|
22
+ next if metric.samples == 0
22
23
  metric.event_payloads.each do |payload|
23
24
  Honeybadger.event(payload.merge(interval: @interval))
24
25
  end
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '5.19.0'.freeze
3
+ VERSION = '5.19.2'.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.19.0
4
+ version: 5.19.2
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-10-29 00:00:00.000000000 Z
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger