aws-xray-sdk 0.11.0 → 0.11.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ef8621b715e92340eb2dfe27f470fd8e4c92d45d0b21f20d814d3a0b298d323
|
4
|
+
data.tar.gz: dc4471eebd695a0e4c7fd31cd7b84709ba166a395f6c31785a482272c0a162b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 656c7425f811713ea11d7e4fb8515d597513c8412f1f77b6a2445c0695b7ff91772815efc349695c49688cb3a1ee07408c4e863811ad40dcde58e8585942dff5
|
7
|
+
data.tar.gz: fbab0222d5abc0048c0fd32a443b1974ad72072386779e858ef88aa541b2bc2797f44ac9ae3a1ae21c066e44973fa30f0c5d78c7e2523a1d32f26d8b1c417f6f
|
@@ -9,7 +9,6 @@ module XRay
|
|
9
9
|
class ServiceConnector
|
10
10
|
include Logging
|
11
11
|
attr_accessor :xray_client
|
12
|
-
@@client_id = SecureRandom.hex(12)
|
13
12
|
|
14
13
|
def initialize
|
15
14
|
update_xray_client
|
@@ -46,6 +45,12 @@ module XRay
|
|
46
45
|
update_xray_client ip: v.tcp_ip, port: v.tcp_port
|
47
46
|
end
|
48
47
|
|
48
|
+
def client_id
|
49
|
+
@client_id ||= begin
|
50
|
+
SecureRandom.hex(12)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
49
54
|
private
|
50
55
|
|
51
56
|
def generate_reports(rules, now)
|
@@ -54,7 +59,7 @@ module XRay
|
|
54
59
|
report = rule.snapshot_statistics
|
55
60
|
report[:rule_name] = rule.name
|
56
61
|
report[:timestamp] = now
|
57
|
-
report[:client_id] =
|
62
|
+
report[:client_id] = client_id
|
58
63
|
reports << report
|
59
64
|
end
|
60
65
|
reports
|
@@ -9,10 +9,12 @@ module XRay
|
|
9
9
|
def initialize(cache:, connector:)
|
10
10
|
@cache = cache
|
11
11
|
@connector = connector
|
12
|
-
@worker = Thread.new { poll }
|
13
12
|
end
|
14
13
|
|
15
14
|
def run
|
15
|
+
@worker ||= begin
|
16
|
+
Thread.new { poll }
|
17
|
+
end
|
16
18
|
@worker.run
|
17
19
|
end
|
18
20
|
|
@@ -20,8 +22,8 @@ module XRay
|
|
20
22
|
|
21
23
|
def poll
|
22
24
|
loop do
|
23
|
-
Thread.stop
|
24
25
|
refresh_cache
|
26
|
+
Thread.stop
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
@@ -33,7 +35,7 @@ module XRay
|
|
33
35
|
@cache.last_updated = now
|
34
36
|
end
|
35
37
|
rescue StandardError => e
|
36
|
-
logger.warn %(failed to fetch X-Ray sampling rules due to #{e.
|
38
|
+
logger.warn %(failed to fetch X-Ray sampling rules due to #{e.message})
|
37
39
|
end
|
38
40
|
end
|
39
41
|
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.11.
|
4
|
+
version: 0.11.1
|
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-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-xray
|