sentry-ruby-core 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/sentry/rack/capture_exceptions.rb +3 -6
- data/lib/sentry/transaction.rb +3 -2
- data/lib/sentry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b378de66aa7efcec9e63c6542a398a0f6a9a556081dd99f77ab45b1ba8afa298
|
4
|
+
data.tar.gz: 7491b05d6b00b24d2160363c0ac345169fb4059e5fc51bfeeb9038ea91c30a3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ba47551dc4b3d5315df49e0e53877d92b8c5f9ce547e615e5b098cc0ca9729db8bafd4d6ca39977dcedb09c5066e7f7084aa5e3e3276e33445087f8d614e321
|
7
|
+
data.tar.gz: 8b5eca42bad5ea2158c4aa68d93e5e6a3db7675be8da4d44fd5c7bf1f963f587cd06c462a893486a739628d1309f7c39e8418ca8b14de1fe241c8fa59587159e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.2.1
|
4
|
+
|
5
|
+
### Bug Fixes
|
6
|
+
|
7
|
+
- Ignore invalid values for sentry-trace header that don't match the required format [#1265](https://github.com/getsentry/sentry-ruby/pull/1265)
|
8
|
+
- Transaction created by `.from_sentry_trace` should inherit sampling decision [#1269](https://github.com/getsentry/sentry-ruby/pull/1269)
|
9
|
+
- Transaction's sample rate should accept any numeric value [#1278](https://github.com/getsentry/sentry-ruby/pull/1278)
|
10
|
+
|
3
11
|
## 4.2.0
|
4
12
|
|
5
13
|
### Features
|
@@ -16,12 +16,9 @@ module Sentry
|
|
16
16
|
scope.set_transaction_name(env["PATH_INFO"]) if env["PATH_INFO"]
|
17
17
|
scope.set_rack_env(env)
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
else
|
23
|
-
Sentry.start_transaction(name: scope.transaction_name, op: transaction_op)
|
24
|
-
end
|
19
|
+
sentry_trace = env["HTTP_SENTRY_TRACE"]
|
20
|
+
span = Sentry::Transaction.from_sentry_trace(sentry_trace, name: scope.transaction_name, op: transaction_op) if sentry_trace
|
21
|
+
span ||= Sentry.start_transaction(name: scope.transaction_name, op: transaction_op)
|
25
22
|
|
26
23
|
scope.set_span(span)
|
27
24
|
|
data/lib/sentry/transaction.rb
CHANGED
@@ -29,11 +29,12 @@ module Sentry
|
|
29
29
|
return unless sentry_trace
|
30
30
|
|
31
31
|
match = SENTRY_TRACE_REGEXP.match(sentry_trace)
|
32
|
+
return if match.nil?
|
32
33
|
trace_id, parent_span_id, sampled_flag = match[1..3]
|
33
34
|
|
34
35
|
sampled = sampled_flag != "0"
|
35
36
|
|
36
|
-
new(trace_id: trace_id, parent_span_id: parent_span_id, parent_sampled: sampled, **options)
|
37
|
+
new(trace_id: trace_id, parent_span_id: parent_span_id, parent_sampled: sampled, sampled: sampled, **options)
|
37
38
|
end
|
38
39
|
|
39
40
|
def to_hash
|
@@ -89,7 +90,7 @@ module Sentry
|
|
89
90
|
sample_rate = traces_sampler.call(sampling_context)
|
90
91
|
end
|
91
92
|
|
92
|
-
unless [true, false].include?(sample_rate) || (sample_rate.is_a?(
|
93
|
+
unless [true, false].include?(sample_rate) || (sample_rate.is_a?(Numeric) && sample_rate >= 0.0 && sample_rate <= 1.0)
|
93
94
|
@sampled = false
|
94
95
|
logger.warn("#{MESSAGE_PREFIX} Discarding #{transaction_description} because of invalid sample_rate: #{sample_rate}")
|
95
96
|
return
|
data/lib/sentry/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-ruby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|