honeybadger 5.26.1 → 5.26.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29b3ba0daf037b0b33d6efe6203df47e53ad35d13a96c8ab0b22ca03e64dd28a
4
- data.tar.gz: 95b2417445b1620938b265bb83d21b3bfe3635ab05f982a09533d4733bb504e9
3
+ metadata.gz: a61036295da38a5d17bcc5061ccb9c07b106e3be1e7642d5561f8f876f9d7c7d
4
+ data.tar.gz: 8790ba8611d838ac98978976862fba259c3aa7bdeb070d7285e54d5659d456aa
5
5
  SHA512:
6
- metadata.gz: '049c4f31805f33b450690484f94f033e1551ca6fa3c3f8519e5342077709d35799f507aa188009f4aa49ff04616df65e4f8eb47006c48f6e83eba281328ffaf8'
7
- data.tar.gz: 8193e7515bd7e6d7b7b34e9e70bc19809fdc69c1e527bc71e2952369cbfa517f7f963afaeaafd6efc78dfabb576879fc2c6f6c90f07e98e869206f2366a5dd99
6
+ metadata.gz: 6f8f7051e9326b04cf314ae0201606a8a558c66235066706df3c00f093318a126599eb055ed574accf9acc2048b015604e1778b19e4aacd5f0c8952264f6a207
7
+ data.tar.gz: 27251a44c22ffa1b1f7b244de298650e119dda596ebc5a9642800ac030f14232fcc938cc79386581b06c085beaa53573c28de876bd4974b8a3a6398912b8403d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [5.26.4](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.26.3...v5.26.4) (2025-02-18)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * ignore transactions with the immediate keyword ([#668](https://github.com/honeybadger-io/honeybadger-ruby/issues/668)) ([43e9ccb](https://github.com/honeybadger-io/honeybadger-ruby/commit/43e9ccb8afb86b6be340dba064af14c5cfd4929f))
10
+
11
+ ## [5.26.3](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.26.2...v5.26.3) (2025-02-10)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * remove mail objects from ActionMailer events ([#664](https://github.com/honeybadger-io/honeybadger-ruby/issues/664)) ([07e0520](https://github.com/honeybadger-io/honeybadger-ruby/commit/07e0520ae1cd27beb16a96e075e64eb6463c97a8)), closes [#663](https://github.com/honeybadger-io/honeybadger-ruby/issues/663)
17
+
18
+ ## [5.26.2](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.26.1...v5.26.2) (2025-01-10)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * ensure instrumentation durations are unique during threaded executions ([#658](https://github.com/honeybadger-io/honeybadger-ruby/issues/658)) ([4c3f0a6](https://github.com/honeybadger-io/honeybadger-ruby/commit/4c3f0a6e69e826b6664d4385009e67fb94c5160e))
24
+
4
25
  ## [5.26.1](https://github.com/honeybadger-io/honeybadger-ruby/compare/v5.26.0...v5.26.1) (2024-12-17)
5
26
 
6
27
 
@@ -42,13 +42,17 @@ module Honeybadger
42
42
  self.class.check_ins
43
43
  end
44
44
 
45
+ def events
46
+ self.class.events
47
+ end
48
+
45
49
  def notify(feature, payload)
46
50
  notifications[feature] << payload
47
51
  super
48
52
  end
49
53
 
50
54
  def event(payload)
51
- events << payload
55
+ events.concat(payload.dup)
52
56
  super
53
57
  end
54
58
 
@@ -27,7 +27,7 @@ module Honeybadger
27
27
  exclude_when: lambda do |data|
28
28
  # Ignore schema, begin, and commit transaction queries
29
29
  data[:name] == "SCHEMA" ||
30
- (data[:sql] && (Util::SQL.force_utf_8(data[:sql].dup) =~ /^(begin|commit)( transaction)?$/i))
30
+ (data[:sql] && (Util::SQL.force_utf_8(data[:sql].dup) =~ /^(begin|commit)( immediate)?( transaction)?$/i))
31
31
  end
32
32
  },
33
33
 
@@ -32,8 +32,8 @@ module Honeybadger
32
32
  'Sidekiq::JobRetry::Skip'].map(&:freeze).freeze
33
33
 
34
34
  IGNORE_EVENTS_DEFAULT = [
35
- { event_type: 'metric.hb', metric_name: 'duration.sql.active_record', query: /^(begin|commit)( transaction)?$/i },
36
- { event_type: 'sql.active_record', query: /^(begin|commit)( transaction)?$/i },
35
+ { event_type: 'metric.hb', metric_name: 'duration.sql.active_record', query: /^(begin|commit)( immediate)?( transaction)?$/i },
36
+ { event_type: 'sql.active_record', query: /^(begin|commit)( immediate)?( transaction)?$/i },
37
37
  { event_type: 'sql.active_record', query: /(solid_queue|good_job)/i },
38
38
  { event_type: 'sql.active_record', name: /^GoodJob/ },
39
39
  { event_type: 'process_action.action_controller', controller: 'Rails::HealthController' }
@@ -6,17 +6,16 @@ module Honeybadger
6
6
  include Honeybadger::InstrumentationHelper
7
7
 
8
8
  def start(name, id, payload)
9
- @start_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
9
+ payload[:_start_time] = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
10
10
  end
11
11
 
12
12
  def finish(name, id, payload)
13
- @finish_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
14
-
13
+ finish_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
15
14
  return unless process?(name, payload)
16
15
 
17
16
  payload = {
18
17
  instrumenter_id: id,
19
- duration: ((@finish_time - @start_time) * 1000).round(2)
18
+ duration: ((finish_time - payload.delete(:_start_time)) * 1000).round(2)
20
19
  }.merge(format_payload(payload).compact)
21
20
 
22
21
  record(name, payload)
@@ -134,6 +133,19 @@ module Honeybadger
134
133
  end
135
134
 
136
135
  class ActionMailerSubscriber < NotificationSubscriber
136
+ def format_payload(payload)
137
+ # Don't include the mail object in the payload...
138
+ mail = payload.delete(:mail)
139
+
140
+ # ... but do include any attachment filenames
141
+ attachment_info = if mail&.attachments&.any?
142
+ { attachments: mail.attachments.map { |a| { filename: a.filename } } }
143
+ else
144
+ {}
145
+ end
146
+
147
+ payload.merge(attachment_info)
148
+ end
137
149
  end
138
150
 
139
151
  class ActiveStorageSubscriber < NotificationSubscriber
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = '5.26.1'.freeze
3
+ VERSION = '5.26.4'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.1
4
+ version: 5.26.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-17 00:00:00.000000000 Z
10
+ date: 2025-02-18 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: logger
@@ -24,6 +23,20 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: ostruct
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
27
40
  description: Make managing application errors a more pleasant experience.
28
41
  email:
29
42
  - support@honeybadger.io
@@ -176,7 +189,6 @@ metadata:
176
189
  documentation_uri: https://docs.honeybadger.io/lib/ruby/
177
190
  homepage_uri: https://www.honeybadger.io/for/ruby/
178
191
  source_code_uri: https://github.com/honeybadger-io/honeybadger-ruby
179
- post_install_message:
180
192
  rdoc_options:
181
193
  - "--markup=tomdoc"
182
194
  - "--main=README.md"
@@ -194,8 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
206
  - !ruby/object:Gem::Version
195
207
  version: '0'
196
208
  requirements: []
197
- rubygems_version: 3.5.22
198
- signing_key:
209
+ rubygems_version: 3.7.0.dev
199
210
  specification_version: 4
200
211
  summary: Error reports you can be happy about.
201
212
  test_files: []