sentry-ruby-core 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 +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f58e301ed4dd9c659dee10a489bc67ec2b3965b721e88842c0749639f751c33
|
4
|
+
data.tar.gz: d7758ef8b065a2b772ccebec8eee4807683a002495ca55dab7e85f8c1b92768f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71cb5b8076d2d4015e3a078ddeb68457460578fa9466fa9d87da55863436ac17ff62e8d6ad78518fc4217950862e39302ab85db2f2835f6729b3fb47b3929a99
|
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-core
|
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: sentry-ruby
|
@@ -15,14 +15,14 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - '='
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 5.22.
|
18
|
+
version: 5.22.3
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - '='
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 5.22.
|
25
|
+
version: 5.22.3
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: concurrent-ruby
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|