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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7d33dc115b581d7db9a5efd5c51f8cbf19eebf1
4
- data.tar.gz: 282a4613a3d206cabdce7e3f985d4d42933374c6
3
+ metadata.gz: 70c0c92edb0c36053747d206937c7680085fcca7
4
+ data.tar.gz: 91debde7d3a0e42b5e41a8cc8acd371b1ec4a57e
5
5
  SHA512:
6
- metadata.gz: e9aaa26eafd03a2c458eec0bd430d7bd05e2415ac16dff7e74efa676ddb6c23b8dcd508c6ece1f1919eddf61c317125b00738c946770f958e420df7e1781f9c0
7
- data.tar.gz: 0d34aa35bb3a6c9adda2859fee7d386c122e13d195f0f72913a74c97958b2ab99e54d2e7086af69c11affa259450b6faa84715e89de66a88d320db3f317a5c2e
6
+ metadata.gz: c327317839ca9a2a602f32717dd409b652ce0e00b21011a45faca2d56a753d3f32604993b85e54fb6110cb41e561aca0d266faf29fb3a68d1744d96f9d090727
7
+ data.tar.gz: 07bd95bf600341d8faaed5f7d8da5217e7365a26e1bef35d416b43e7d118b50dad7533971a347773e3f7ca88c4d30b76e1ca7847fd283d208c814519990a79aa
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.36.0'
3
+ VERSION = '0.37.0'
4
4
  end
5
5
  end
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.36.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.11
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.