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 +4 -4
- data/lib/aws-xray-sdk/model/segment.rb +2 -1
- data/lib/aws-xray-sdk/recorder.rb +24 -7
- data/lib/aws-xray-sdk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f2d9c2d4965cb1d4635d4e6a735f514c67adb2af4dbf26bb8188c162f6c1c0e
|
4
|
+
data.tar.gz: b8dc27fa2569bab52976d702e3d5b1112f29b614038b469defb8959fa6feab69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
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
|
-
|
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
|
data/lib/aws-xray-sdk/version.rb
CHANGED
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.
|
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-
|
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.
|
220
|
+
rubygems_version: 2.7.6
|
221
221
|
signing_key:
|
222
222
|
specification_version: 4
|
223
223
|
summary: AWS X-Ray SDK for Ruby
|