sentry-ruby 5.22.2 → 5.22.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sentry/client.rb +17 -2
- data/lib/sentry/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6efd6e1590191762ede29567335f21b5e54ff63bb85c26e586ecc5e3ce8c5f2a
|
4
|
+
data.tar.gz: d7758ef8b065a2b772ccebec8eee4807683a002495ca55dab7e85f8c1b92768f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 126c7238fb1dbd17f80986824bbd73eab5fba5a70b1f39a87cc59ff7fafb52474b3eb5b9b8043af03b3049acdf2ac1b322c572c652edee015aa7cabeb1d5c61a
|
7
|
+
data.tar.gz: 5f6777c874b1544eab2e47359d61d1eb6cd725b6f1788e2595815e8340d1291e7da7632373c77635ebe717e8c75537a9157a0a904a90bdc1b518fb9819adb0e8
|
data/lib/sentry/client.rb
CHANGED
@@ -183,7 +183,15 @@ module Sentry
|
|
183
183
|
if event_type != TransactionEvent::TYPE && configuration.before_send
|
184
184
|
event = configuration.before_send.call(event, hint)
|
185
185
|
|
186
|
-
|
186
|
+
case event
|
187
|
+
when ErrorEvent
|
188
|
+
# do nothing
|
189
|
+
when Hash
|
190
|
+
log_debug(<<~MSG)
|
191
|
+
Returning a Hash from before_send is deprecated and will be removed in the next major version.
|
192
|
+
Please return a Sentry::ErrorEvent object instead.
|
193
|
+
MSG
|
194
|
+
else
|
187
195
|
# Avoid serializing the event object in this case because we aren't sure what it is and what it contains
|
188
196
|
log_debug(<<~MSG)
|
189
197
|
Discarded event because before_send didn't return a Sentry::ErrorEvent object but an instance of #{event.class}
|
@@ -196,10 +204,17 @@ module Sentry
|
|
196
204
|
if event_type == TransactionEvent::TYPE && configuration.before_send_transaction
|
197
205
|
event = configuration.before_send_transaction.call(event, hint)
|
198
206
|
|
199
|
-
if event.is_a?(TransactionEvent)
|
207
|
+
if event.is_a?(TransactionEvent) || event.is_a?(Hash)
|
200
208
|
spans_after = event.is_a?(TransactionEvent) ? event.spans.size : 0
|
201
209
|
spans_delta = spans_before - spans_after
|
202
210
|
transport.record_lost_event(:before_send, "span", num: spans_delta) if spans_delta > 0
|
211
|
+
|
212
|
+
if event.is_a?(Hash)
|
213
|
+
log_debug(<<~MSG)
|
214
|
+
Returning a Hash from before_send_transaction is deprecated and will be removed in the next major version.
|
215
|
+
Please return a Sentry::TransactionEvent object instead.
|
216
|
+
MSG
|
217
|
+
end
|
203
218
|
else
|
204
219
|
# Avoid serializing the event object in this case because we aren't sure what it is and what it contains
|
205
220
|
log_debug(<<~MSG)
|
data/lib/sentry/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.22.
|
4
|
+
version: 5.22.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: concurrent-ruby
|
@@ -150,15 +150,15 @@ files:
|
|
150
150
|
- lib/sentry/version.rb
|
151
151
|
- sentry-ruby-core.gemspec
|
152
152
|
- sentry-ruby.gemspec
|
153
|
-
homepage: https://github.com/getsentry/sentry-ruby/tree/5.22.
|
153
|
+
homepage: https://github.com/getsentry/sentry-ruby/tree/5.22.3/sentry-ruby
|
154
154
|
licenses:
|
155
155
|
- MIT
|
156
156
|
metadata:
|
157
|
-
homepage_uri: https://github.com/getsentry/sentry-ruby/tree/5.22.
|
158
|
-
source_code_uri: https://github.com/getsentry/sentry-ruby/tree/5.22.
|
159
|
-
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/5.22.
|
157
|
+
homepage_uri: https://github.com/getsentry/sentry-ruby/tree/5.22.3/sentry-ruby
|
158
|
+
source_code_uri: https://github.com/getsentry/sentry-ruby/tree/5.22.3/sentry-ruby
|
159
|
+
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/5.22.3/CHANGELOG.md
|
160
160
|
bug_tracker_uri: https://github.com/getsentry/sentry-ruby/issues
|
161
|
-
documentation_uri: http://www.rubydoc.info/gems/sentry-ruby/5.22.
|
161
|
+
documentation_uri: http://www.rubydoc.info/gems/sentry-ruby/5.22.3
|
162
162
|
rdoc_options: []
|
163
163
|
require_paths:
|
164
164
|
- lib
|