aws-xray 0.20.3 → 0.21.0

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
  SHA1:
3
- metadata.gz: 9dfe984713294a18508d8dd9a9b74573c3ed71b2
4
- data.tar.gz: cb82d27ce6d019ccc30fd24b9c80cb76d733b28b
3
+ metadata.gz: d50f25b7b9235c56f0a00d34fd2604fd035784af
4
+ data.tar.gz: 643838af98ab3e99e36fd10a8dc8806ed80e5b08
5
5
  SHA512:
6
- metadata.gz: 4d888a9adb83016a41983c6304c09c202549a84e2c20e9c39319f3c914031796598a7aa9dc17ec9ace5b456e9068f5cda9007c0813aeae7898ee38941d979475
7
- data.tar.gz: a132d3e8c255d6ac72665f5a3461508c0b2c3c5138fb29967c1a75690243a3942fdb56ba527bb5ae8250c2953fdc2f1e757d194e9a2afbc5aa5db72fe2698db6
6
+ metadata.gz: fda8e93c3225e75efe5a7b53e272309aa72496f85a86a7cca6950031d2e1fdc819b5e185da867f6144a89812a82ab00ecbc6ef27bf308e2b7ee51bd4810d4d67
7
+ data.tar.gz: 256ff91bdb4f7d654e6a5f4f93cf5b789ec23fa15aeac642bafd5b21a9d6ef5815b43c4ad6848c853eae354df7214771ab9b9cd3a7cd7b1d7b6847cbd0a71175
data/aws-xray.gemspec CHANGED
@@ -30,5 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'rack-test'
31
31
  spec.add_development_dependency 'rack-timeout'
32
32
  spec.add_development_dependency 'rake'
33
+ spec.add_development_dependency 'rsolr'
33
34
  spec.add_development_dependency 'rspec'
35
+ spec.add_development_dependency 'webmock'
34
36
  end
@@ -40,6 +40,7 @@ module Aws
40
40
  @segment_sending_error_handler = DefaultErrorHandler.new($stderr)
41
41
  @worker = Aws::Xray::Worker::Configuration.new
42
42
  @sampling_rate = Float(ENV['AWS_XRAY_SAMPLING_RATE'] || 0.001)
43
+ @solr_hook_name = 'solr'
43
44
  end
44
45
 
45
46
  # @param [String] name Logical service name for this application.
@@ -98,6 +99,10 @@ module Aws
98
99
  # @param [Logger] logger
99
100
  # @return [Logger]
100
101
  attr_accessor :logger
102
+
103
+ # @param [String] solr_hook_name
104
+ # @return [String]
105
+ attr_accessor :solr_hook_name
101
106
  end
102
107
  end
103
108
  end
@@ -1,2 +1,3 @@
1
1
  require 'aws/xray'
2
2
  require 'aws/xray/hooks/net_http'
3
+ require 'aws/xray/hooks/rsolr'
@@ -0,0 +1,23 @@
1
+ require 'aws/xray'
2
+ require 'rsolr'
3
+
4
+ module Aws
5
+ module Xray
6
+ module Hooks
7
+ module Rsolr
8
+ def send_and_receive_with_aws_xray(*args, &block)
9
+ Aws::Xray.overwrite(name: Aws::Xray.config.solr_hook_name) do
10
+ send_and_receive_without_aws_xray(*args, &block)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+ class RSolr::Client
19
+ include(Aws::Xray::Hooks::Rsolr)
20
+
21
+ alias send_and_receive_without_aws_xray send_and_receive
22
+ alias send_and_receive send_and_receive_with_aws_xray
23
+ end
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.20.3'
3
+ VERSION = '0.21.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-xray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.3
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taiki Ono
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rsolr
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: rspec
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +164,20 @@ dependencies:
150
164
  - - ">="
151
165
  - !ruby/object:Gem::Version
152
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: webmock
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
153
181
  description: The unofficial X-Ray Tracing SDK for Ruby.
154
182
  email:
155
183
  - taiks.4559@gmail.com
@@ -190,6 +218,7 @@ files:
190
218
  - lib/aws/xray/header_parser.rb
191
219
  - lib/aws/xray/hooks/all.rb
192
220
  - lib/aws/xray/hooks/net_http.rb
221
+ - lib/aws/xray/hooks/rsolr.rb
193
222
  - lib/aws/xray/rack.rb
194
223
  - lib/aws/xray/rails.rb
195
224
  - lib/aws/xray/request.rb