aws-xray 0.15.1 → 0.16.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 +4 -1
- data/lib/aws/xray/hooks/net_http.rb +2 -2
- 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: cb65c48a877e87915776fa765ab77e7274287d1a
|
4
|
+
data.tar.gz: 5522ae2e4792cae8c313021d1705237d3734ad23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a76f973fa970b3b29dd4d4755ac103fefe15905d235ee5cd231682d4bbc3d8dee3fef70e3a619a896daf45561f870f63805e1a50ca194c434e21415c74640f61
|
7
|
+
data.tar.gz: 8cd98e3d5d76249fd18aec23a6f883046cfd130813c68c35c09f2d3cc4b87b49285e5641746b04bd618c2aa20a49785cc5d027c154d21c40bbd9dd6b56dca681
|
data/lib/aws/xray/context.rb
CHANGED
@@ -27,8 +27,11 @@ module Aws
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# @param [Aws::Xray::Context] context
|
30
|
-
def
|
30
|
+
def with_given_context(context)
|
31
31
|
Thread.current.thread_variable_set(VAR_NAME, context)
|
32
|
+
yield
|
33
|
+
ensure
|
34
|
+
remove_current
|
32
35
|
end
|
33
36
|
|
34
37
|
# @return [Boolean]
|
@@ -6,7 +6,7 @@ module Aws
|
|
6
6
|
module NetHttp
|
7
7
|
NAME_HEADER = 'X-Aws-Xray-Name'.freeze
|
8
8
|
|
9
|
-
def request_with_aws_xray(req, *args)
|
9
|
+
def request_with_aws_xray(req, *args, &block)
|
10
10
|
return request_without_aws_xray(req, *args) unless Context.started?
|
11
11
|
return request_without_aws_xray(req, *args) if Context.current.disabled?(:net_http)
|
12
12
|
|
@@ -26,7 +26,7 @@ module Aws
|
|
26
26
|
req[TRACE_HEADER] = propagate_trace.to_header_value
|
27
27
|
sub.set_http_request(request_record)
|
28
28
|
|
29
|
-
res = request_without_aws_xray(req, *args)
|
29
|
+
res = request_without_aws_xray(req, *args, &block)
|
30
30
|
|
31
31
|
sub.set_http_response(res.code.to_i, res['Content-Length'])
|
32
32
|
case res.code.to_i
|
data/lib/aws/xray/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-xray
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taiki Ono
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|