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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 299ef3e4e20724f082b232846ec09d48257cf4e7
4
- data.tar.gz: d66f81590342387f0dcdf80981aea4ec95fd9449
3
+ metadata.gz: ab1ededbeaec72532b3fd8640450ed0c72ef255f
4
+ data.tar.gz: 984d6f352917b1c3b279a2d859977e332aeac7fb
5
5
  SHA512:
6
- metadata.gz: 364d93ef9043a99cc26383d1d6fe5f563fa580b9aaa2b4b7fc733eb4089de5602a66c8c61b002c2e2a7c7c92d6525ced5b12b7e461602a00f402c05a621ac8e8
7
- data.tar.gz: 90c80537e55f225c5d797684e10472e56f617c6e5c7b3a9edcf237da933966dc82e9a6fa7f5068466e787733871f23811a336591fd32d47107701c355db8686c
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 request(req, *args)
10
- return super unless Context.started?
11
- return super if Context.current.disabled?(:net_http)
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 = super
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.prepend(Aws::Xray::Hooks::NetHttp)
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
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.15.0'
3
+ VERSION = '0.15.1'
4
4
  end
5
5
  end
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.0
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-08 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday