aws-xray-sdk 0.10.1 → 0.10.2

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
  SHA256:
3
- metadata.gz: aa13953d2a4cdedb5933f00937285819a7032dc2fb6aee5be4cd51769d077984
4
- data.tar.gz: 6022a3d607df51af4a955764cc2ec11d0d5a5cf47695b3d0f280cb7900427826
3
+ metadata.gz: 0f2d9c2d4965cb1d4635d4e6a735f514c67adb2af4dbf26bb8188c162f6c1c0e
4
+ data.tar.gz: b8dc27fa2569bab52976d702e3d5b1112f29b614038b469defb8959fa6feab69
5
5
  SHA512:
6
- metadata.gz: 7c6e1e9081ee380a1ed85836f803b9b7c2e14be298df6fbf3258d946380d40798f08f38a56d599879ced211091eec34b9275b5c7ece924299513371fd690a7a4
7
- data.tar.gz: c173a4b0cd49a589997dd24ef5deb30f0f2f802e15c7712471542851c55c0c2d612dd5ed707ca6751586da34042d7ed55ced061f26f77e3d159e696fc0136f0a
6
+ metadata.gz: f63ce08cbdf5d6d913966c3485c4e75b444c8a1866ede982a8e2950b251a05c83b35351c46ff64749ccc4d74f2a6dc9950f10bd23f3a5e6bcf8cefa764ac87ff
7
+ data.tar.gz: 3a6a2183e526b5dbabe8d36e540cfefe20bc0f93d2ab8da8a77e2c6060bd91b8deda2bf0c93f13f4f5ab286230b509774a08f50059001fa328ab8b095d18e009
@@ -6,7 +6,7 @@ module XRay
6
6
  # details about the request, and details about the work done.
7
7
  class Segment
8
8
  include Entity
9
- attr_accessor :ref_counter, :subsegment_size, :origin, :user
9
+ attr_accessor :ref_counter, :subsegment_size, :origin, :user, :service
10
10
 
11
11
  # @param [String] trace_id Manually crafted trace id.
12
12
  # @param [String] name Must be specified either on object creation or
@@ -53,6 +53,7 @@ module XRay
53
53
  h[:origin] = origin if origin
54
54
  h[:parent_id] = @parent_id if @parent_id
55
55
  h[:user] = user if user
56
+ h[:service] = service if service
56
57
  h
57
58
  end
58
59
 
@@ -5,6 +5,7 @@ require 'aws-xray-sdk/model/subsegment'
5
5
  require 'aws-xray-sdk/model/dummy_entities'
6
6
  require 'aws-xray-sdk/model/annotations'
7
7
  require 'aws-xray-sdk/model/metadata'
8
+ require 'aws-xray-sdk/version'
8
9
 
9
10
  module XRay
10
11
  # A global AWS X-Ray recorder that will begin/end segments/subsegments
@@ -204,15 +205,31 @@ module XRay
204
205
  private_class_method
205
206
 
206
207
  def populate_runtime_context(segment)
207
- aws = {}
208
- config.plugins.each do |p|
209
- meta = p.aws
210
- if meta.is_a?(Hash) && !meta.empty?
211
- aws.merge! meta
212
- segment.origin = p::ORIGIN
208
+ @aws ||= begin
209
+ aws = {}
210
+ config.plugins.each do |p|
211
+ meta = p.aws
212
+ if meta.is_a?(Hash) && !meta.empty?
213
+ aws.merge! meta
214
+ segment.origin = p::ORIGIN
215
+ end
213
216
  end
217
+ xray_meta = { xray:
218
+ {
219
+ sdk_version: XRay::VERSION,
220
+ sdk: 'X-Ray for Ruby'
221
+ }
222
+ }
223
+ aws.merge! xray_meta
214
224
  end
215
- segment.aws = aws unless aws.empty?
225
+
226
+ @service ||= {
227
+ runtime: RUBY_ENGINE,
228
+ runtime_version: RUBY_VERSION
229
+ }
230
+
231
+ segment.aws = @aws
232
+ segment.service = @service
216
233
  end
217
234
  end
218
235
  end
@@ -1,3 +1,3 @@
1
1
  module XRay
2
- VERSION = '0.10.1'
2
+ VERSION = '0.10.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-xray-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-22 00:00:00.000000000 Z
11
+ date: 2018-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  version: '0'
218
218
  requirements: []
219
219
  rubyforge_project:
220
- rubygems_version: 2.7.3
220
+ rubygems_version: 2.7.6
221
221
  signing_key:
222
222
  specification_version: 4
223
223
  summary: AWS X-Ray SDK for Ruby