aws-xray 0.36.0 → 0.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/xray/context.rb +9 -0
- data/lib/aws/xray/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70c0c92edb0c36053747d206937c7680085fcca7
|
4
|
+
data.tar.gz: 91debde7d3a0e42b5e41a8cc8acd371b1ec4a57e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c327317839ca9a2a602f32717dd409b652ce0e00b21011a45faca2d56a753d3f32604993b85e54fb6110cb41e561aca0d266faf29fb3a68d1744d96f9d090727
|
7
|
+
data.tar.gz: 07bd95bf600341d8faaed5f7d8da5217e7365a26e1bef35d416b43e7d118b50dad7533971a347773e3f7ca88c4d30b76e1ca7847fd283d208c814519990a79aa
|
data/lib/aws/xray/context.rb
CHANGED
@@ -80,6 +80,7 @@ module Aws
|
|
80
80
|
yield base_segment
|
81
81
|
rescue Exception => e
|
82
82
|
base_segment.set_error(fault: true, e: e)
|
83
|
+
record_traced! if @trace.sampled?
|
83
84
|
raise e
|
84
85
|
ensure
|
85
86
|
base_segment.finish unless base_segment.finished?
|
@@ -101,6 +102,7 @@ module Aws
|
|
101
102
|
yield sub
|
102
103
|
rescue Exception => e
|
103
104
|
sub.set_error(fault: true, e: e)
|
105
|
+
record_traced! if @trace.sampled?
|
104
106
|
raise e
|
105
107
|
ensure
|
106
108
|
sub.finish unless sub.finished?
|
@@ -150,6 +152,13 @@ module Aws
|
|
150
152
|
@subsegment_name = nil
|
151
153
|
name
|
152
154
|
end
|
155
|
+
|
156
|
+
def record_traced!
|
157
|
+
::Raven.tags_context(traced: '1') if defined?(::Raven)
|
158
|
+
rescue => e
|
159
|
+
Aws::Xray.config.logger.error("#{e.message}\n#{e.backtrace.join("\n")}")
|
160
|
+
# Ignore the error
|
161
|
+
end
|
153
162
|
end
|
154
163
|
end
|
155
164
|
end
|
data/lib/aws/xray/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-xray
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taiki Ono
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
314
|
rubyforge_project:
|
315
|
-
rubygems_version: 2.6.
|
315
|
+
rubygems_version: 2.6.13
|
316
316
|
signing_key:
|
317
317
|
specification_version: 4
|
318
318
|
summary: The unofficial X-Ray Tracing SDK for Ruby.
|