aws-xray 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws/xray/hooks/net_http.rb +10 -5
- 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: ab1ededbeaec72532b3fd8640450ed0c72ef255f
|
|
4
|
+
data.tar.gz: 984d6f352917b1c3b279a2d859977e332aeac7fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5d81c1b147dbffa156ec45eb8b459c54a4c3a849e1a6bdbc45295b5436674bac29782d81884b0b562fd497f1363f3bdae464a026b5272da38668f60c0471c73
|
|
7
|
+
data.tar.gz: a27c730779d6fcda961858a7b97f95a9bea3380f93fe0aa29e74bb071aae1e6d5a0b7755e89297c5ba300de7255a66a04a6c35c4b230ee0877532fd33a9f4d6c
|
|
@@ -6,9 +6,9 @@ module Aws
|
|
|
6
6
|
module NetHttp
|
|
7
7
|
NAME_HEADER = 'X-Aws-Xray-Name'.freeze
|
|
8
8
|
|
|
9
|
-
def
|
|
10
|
-
return
|
|
11
|
-
return
|
|
9
|
+
def request_with_aws_xray(req, *args)
|
|
10
|
+
return request_without_aws_xray(req, *args) unless Context.started?
|
|
11
|
+
return request_without_aws_xray(req, *args) if Context.current.disabled?(:net_http)
|
|
12
12
|
|
|
13
13
|
uri = URI('')
|
|
14
14
|
uri.scheme = use_ssl? ? 'https' : 'http'
|
|
@@ -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 =
|
|
29
|
+
res = request_without_aws_xray(req, *args)
|
|
30
30
|
|
|
31
31
|
sub.set_http_response(res.code.to_i, res['Content-Length'])
|
|
32
32
|
case res.code.to_i
|
|
@@ -51,4 +51,9 @@ module Aws
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
Net::HTTP
|
|
54
|
+
class Net::HTTP
|
|
55
|
+
include Aws::Xray::Hooks::NetHttp
|
|
56
|
+
|
|
57
|
+
alias request_without_aws_xray request
|
|
58
|
+
alias request request_with_aws_xray
|
|
59
|
+
end
|
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.15.
|
|
4
|
+
version: 0.15.1
|
|
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-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|