opentracing-instrumentation 0.1.15 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.BUNDLER_VERSION +1 -1
  3. data/.drone.jsonnet +3 -3
  4. data/.gitlab-ci.yml +12 -11
  5. data/.rubocop.yml +7 -0
  6. data/.ruby-version +1 -1
  7. data/CHANGELOG.md +7 -0
  8. data/GEM_VERSION +1 -1
  9. data/Gemfile +7 -7
  10. data/Gemfile.lock +80 -60
  11. data/bin/check_gemfile_lock +18 -0
  12. data/lib/opentracing/instrumentation/bunny.rb +11 -11
  13. data/lib/opentracing/instrumentation/bunny/regexp_routing_key_sanitazer.rb +1 -1
  14. data/lib/opentracing/instrumentation/common.rb +2 -0
  15. data/lib/opentracing/instrumentation/common/error_writer.rb +2 -2
  16. data/lib/opentracing/instrumentation/common/operation_name_builder.rb +23 -0
  17. data/lib/opentracing/instrumentation/faraday/response_logger.rb +4 -4
  18. data/lib/opentracing/instrumentation/faraday/trace_middleware.rb +1 -1
  19. data/lib/opentracing/instrumentation/hutch.rb +6 -6
  20. data/lib/opentracing/instrumentation/mongo.rb +2 -0
  21. data/lib/opentracing/instrumentation/mongo/query_sanitazer.rb +48 -5
  22. data/lib/opentracing/instrumentation/mongo/sample_safety_argument_checker.rb +30 -0
  23. data/lib/opentracing/instrumentation/mongo/trace_subscriber.rb +5 -5
  24. data/lib/opentracing/instrumentation/rack/http_tagger.rb +3 -3
  25. data/lib/opentracing/instrumentation/rack/trace_middleware.rb +5 -5
  26. data/lib/opentracing/instrumentation/redis/config.rb +5 -5
  27. data/lib/opentracing/instrumentation/redis/tracing_driver_wrapper.rb +4 -4
  28. data/lib/opentracing/instrumentation/sidekiq/client_middleware.rb +41 -18
  29. data/lib/opentracing/instrumentation/sidekiq/job_tagger.rb +7 -7
  30. data/lib/opentracing/instrumentation/sidekiq/server_middleware.rb +41 -15
  31. data/lib/opentracing/instrumentation/thrift.rb +9 -9
  32. data/lib/opentracing/instrumentation/thrift/traced_processor.rb +2 -2
  33. data/lib/opentracing/instrumentation/thrift/traced_processor_config.rb +1 -1
  34. data/lib/opentracing/instrumentation/thrift/traced_processor_tags_builder.rb +1 -0
  35. data/lib/opentracing/instrumentation/thrift/traced_protocol.rb +3 -3
  36. data/lib/opentracing/instrumentation/thrift/traced_protocol_factory.rb +1 -0
  37. data/lib/opentracing/instrumentation/thrift/traced_protocol_tags_builder.rb +1 -1
  38. data/opentracing-instrumentation.gemspec +11 -7
  39. metadata +42 -23
@@ -16,23 +16,23 @@ module OpenTracing
16
16
  }.freeze
17
17
 
18
18
  autoload :TracedProcessor,
19
- module_path + '/traced_processor'
19
+ "#{module_path}/traced_processor"
20
20
  autoload :TracedProcessorConfig,
21
- module_path + '/traced_processor_config'
21
+ "#{module_path}/traced_processor_config"
22
22
  autoload :TracedProcessorOperationNameBuilder,
23
- module_path + '/traced_processor_operation_name_builder'
23
+ "#{module_path}/traced_processor_operation_name_builder"
24
24
  autoload :TracedProcessorTagsBuilder,
25
- module_path + '/traced_processor_tags_builder'
25
+ "#{module_path}/traced_processor_tags_builder"
26
26
  autoload :TracedProtocol,
27
- module_path + '/traced_protocol'
27
+ "#{module_path}/traced_protocol"
28
28
  autoload :TracedProtocolConfig,
29
- module_path + '/traced_protocol_config'
29
+ "#{module_path}/traced_protocol_config"
30
30
  autoload :TracedProtocolFactory,
31
- module_path + '/traced_protocol_factory'
31
+ "#{module_path}/traced_protocol_factory"
32
32
  autoload :TracedProtocolOperationNameBuilder,
33
- module_path + '/traced_protocol_operation_name_builder'
33
+ "#{module_path}/traced_protocol_operation_name_builder"
34
34
  autoload :TracedProtocolTagsBuilder,
35
- module_path + '/traced_protocol_tags_builder'
35
+ "#{module_path}/traced_protocol_tags_builder"
36
36
  end
37
37
  end
38
38
  end
@@ -52,8 +52,8 @@ module OpenTracing
52
52
 
53
53
  private
54
54
 
55
- attr_reader :processor
56
- attr_reader :config
55
+ attr_reader :processor,
56
+ :config
57
57
 
58
58
  def_delegators :config,
59
59
  :tracer,
@@ -21,7 +21,7 @@ module OpenTracing
21
21
  attr_accessor :error_writer
22
22
 
23
23
  # @return [Logger] used for log errors. If nil (by default), then logging disabled,
24
- attr_reader :logger
24
+ attr_accessor :logger
25
25
 
26
26
  def initialize
27
27
  @tracer = OpenTracing.global_tracer
@@ -11,6 +11,7 @@ module OpenTracing
11
11
  }.freeze
12
12
 
13
13
  def initialize(static_tags: DEFAULT_STATIC_TAGS)
14
+ super()
14
15
  @static_tags = static_tags
15
16
  end
16
17
 
@@ -81,9 +81,9 @@ module OpenTracing
81
81
 
82
82
  protected
83
83
 
84
- attr_reader :protocol_tags
85
- attr_reader :protocol
86
- attr_reader :config
84
+ attr_reader :protocol_tags,
85
+ :protocol,
86
+ :config
87
87
 
88
88
  private
89
89
 
@@ -29,6 +29,7 @@ module OpenTracing
29
29
  # run thrift_app
30
30
  class TracedProtocolFactory < ::Thrift::BaseProtocolFactory
31
31
  def initialize(protocol_factory, config: TracedProtocolConfig.new)
32
+ super()
32
33
  @protocol_factory = protocol_factory
33
34
  @config = config
34
35
  end
@@ -31,7 +31,7 @@ module OpenTracing
31
31
 
32
32
  private
33
33
 
34
- NAME_PATTER = /((?<service_name>\w+):)?(?<method>\w+)/.freeze
34
+ NAME_PATTER = /(?:(?<service_name>\w+):)?(?<method>\w+)/.freeze
35
35
  SERVICE_NAME_PART = 'service_name'
36
36
  METHOD_PART = 'method'
37
37
 
@@ -11,7 +11,8 @@ Gem::Specification.new do |spec|
11
11
  spec.email = ['job@fedorenko-d.ru']
12
12
 
13
13
  spec.summary = 'OpenTracing instrumentation for popular ruby libraries'
14
- spec.description = 'OpenTracing instrumentation for Mongo, Faraday, Rack and PORO'
14
+ spec.description = 'OpenTracing instrumentation for Bunny, Faraday, Hutch, Mongo, PORO, ' \
15
+ 'Rack, Sidekiq, Sinatra, Thrift'
15
16
  spec.homepage = 'https://gitlab.com/c0va23/ruby-opentracing-instrumentation.'
16
17
  spec.license = 'MIT'
17
18
 
@@ -24,6 +25,8 @@ Gem::Specification.new do |spec|
24
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
26
  spec.require_paths = ['lib']
26
27
 
28
+ spec.required_ruby_version = "> #{File.read('.ruby-version').strip}"
29
+
27
30
  spec.add_runtime_dependency 'json'
28
31
  spec.add_runtime_dependency 'opentracing', '~> 0.5.0'
29
32
 
@@ -31,15 +34,16 @@ Gem::Specification.new do |spec|
31
34
  spec.add_development_dependency 'bson', '~> 4.0'
32
35
  spec.add_development_dependency 'bundler', File.read('.BUNDLER_VERSION').strip
33
36
  spec.add_development_dependency 'bunny', '~> 2.0'
34
- spec.add_development_dependency 'faraday', '~> 1.0.1'
37
+ spec.add_development_dependency 'faraday', '~> 1.0'
35
38
  spec.add_development_dependency 'hutch', '~> 0.26.0'
36
39
  spec.add_development_dependency 'rack', '~> 2.2.2'
37
40
  spec.add_development_dependency 'rake', '~> 13.0'
38
41
  spec.add_development_dependency 'redis', '~> 3.3.5'
39
42
  spec.add_development_dependency 'rspec', '~> 3.0'
40
- spec.add_development_dependency 'rubocop', '~> 0.80.0'
41
- spec.add_development_dependency 'rubocop-performance', '~> 1.5.2'
42
- spec.add_development_dependency 'rubocop-rspec', '~> 1.38.1'
43
- spec.add_development_dependency 'rubocop-thread_safety', '~> 0.3.4'
44
- spec.add_development_dependency 'thrift', '~> 0.11.0'
43
+ spec.add_development_dependency 'rubocop', '~> 1.15.0'
44
+ spec.add_development_dependency 'rubocop-performance', '~> 1.11.3'
45
+ spec.add_development_dependency 'rubocop-rake', '~> 0.5.1'
46
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.3.0'
47
+ spec.add_development_dependency 'rubocop-thread_safety', '~> 0.4.2'
48
+ spec.add_development_dependency 'thrift', '~> 0.14.1'
45
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentracing-instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fedorenko Dmitrij
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 2.1.4
75
+ version: 2.2.15
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 2.1.4
82
+ version: 2.2.15
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bunny
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.0.1
103
+ version: '1.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.0.1
110
+ version: '1.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: hutch
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -184,71 +184,86 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 0.80.0
187
+ version: 1.15.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 0.80.0
194
+ version: 1.15.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rubocop-performance
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 1.5.2
201
+ version: 1.11.3
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 1.5.2
208
+ version: 1.11.3
209
+ - !ruby/object:Gem::Dependency
210
+ name: rubocop-rake
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: 0.5.1
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: 0.5.1
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: rubocop-rspec
211
225
  requirement: !ruby/object:Gem::Requirement
212
226
  requirements:
213
227
  - - "~>"
214
228
  - !ruby/object:Gem::Version
215
- version: 1.38.1
229
+ version: 2.3.0
216
230
  type: :development
217
231
  prerelease: false
218
232
  version_requirements: !ruby/object:Gem::Requirement
219
233
  requirements:
220
234
  - - "~>"
221
235
  - !ruby/object:Gem::Version
222
- version: 1.38.1
236
+ version: 2.3.0
223
237
  - !ruby/object:Gem::Dependency
224
238
  name: rubocop-thread_safety
225
239
  requirement: !ruby/object:Gem::Requirement
226
240
  requirements:
227
241
  - - "~>"
228
242
  - !ruby/object:Gem::Version
229
- version: 0.3.4
243
+ version: 0.4.2
230
244
  type: :development
231
245
  prerelease: false
232
246
  version_requirements: !ruby/object:Gem::Requirement
233
247
  requirements:
234
248
  - - "~>"
235
249
  - !ruby/object:Gem::Version
236
- version: 0.3.4
250
+ version: 0.4.2
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: thrift
239
253
  requirement: !ruby/object:Gem::Requirement
240
254
  requirements:
241
255
  - - "~>"
242
256
  - !ruby/object:Gem::Version
243
- version: 0.11.0
257
+ version: 0.14.1
244
258
  type: :development
245
259
  prerelease: false
246
260
  version_requirements: !ruby/object:Gem::Requirement
247
261
  requirements:
248
262
  - - "~>"
249
263
  - !ruby/object:Gem::Version
250
- version: 0.11.0
251
- description: OpenTracing instrumentation for Mongo, Faraday, Rack and PORO
264
+ version: 0.14.1
265
+ description: OpenTracing instrumentation for Bunny, Faraday, Hutch, Mongo, PORO, Rack,
266
+ Sidekiq, Sinatra, Thrift
252
267
  email:
253
268
  - job@fedorenko-d.ru
254
269
  executables: []
@@ -261,12 +276,14 @@ files:
261
276
  - ".gitlab-ci.yml"
262
277
  - ".rubocop.yml"
263
278
  - ".ruby-version"
279
+ - CHANGELOG.md
264
280
  - GEM_VERSION
265
281
  - Gemfile
266
282
  - Gemfile.lock
267
283
  - LICENSE.txt
268
284
  - README.md
269
285
  - Rakefile
286
+ - bin/check_gemfile_lock
270
287
  - bin/console
271
288
  - bin/setup
272
289
  - lib/opentracing/instrumentation.rb
@@ -284,6 +301,7 @@ files:
284
301
  - lib/opentracing/instrumentation/bunny/regexp_routing_key_sanitazer.rb
285
302
  - lib/opentracing/instrumentation/common.rb
286
303
  - lib/opentracing/instrumentation/common/error_writer.rb
304
+ - lib/opentracing/instrumentation/common/operation_name_builder.rb
287
305
  - lib/opentracing/instrumentation/faraday.rb
288
306
  - lib/opentracing/instrumentation/faraday/response_logger.rb
289
307
  - lib/opentracing/instrumentation/faraday/trace_middleware.rb
@@ -298,6 +316,7 @@ files:
298
316
  - lib/opentracing/instrumentation/mongo/direct_sanitazer.rb
299
317
  - lib/opentracing/instrumentation/mongo/operation_name_builder.rb
300
318
  - lib/opentracing/instrumentation/mongo/query_sanitazer.rb
319
+ - lib/opentracing/instrumentation/mongo/sample_safety_argument_checker.rb
301
320
  - lib/opentracing/instrumentation/mongo/trace_subscriber.rb
302
321
  - lib/opentracing/instrumentation/object_wrapper.rb
303
322
  - lib/opentracing/instrumentation/rack.rb
@@ -335,23 +354,23 @@ homepage: https://gitlab.com/c0va23/ruby-opentracing-instrumentation.
335
354
  licenses:
336
355
  - MIT
337
356
  metadata: {}
338
- post_install_message:
357
+ post_install_message:
339
358
  rdoc_options: []
340
359
  require_paths:
341
360
  - lib
342
361
  required_ruby_version: !ruby/object:Gem::Requirement
343
362
  requirements:
344
- - - ">="
363
+ - - ">"
345
364
  - !ruby/object:Gem::Version
346
- version: '0'
365
+ version: 2.5.0
347
366
  required_rubygems_version: !ruby/object:Gem::Requirement
348
367
  requirements:
349
368
  - - ">="
350
369
  - !ruby/object:Gem::Version
351
370
  version: '0'
352
371
  requirements: []
353
- rubygems_version: 3.1.2
354
- signing_key:
372
+ rubygems_version: 3.1.6
373
+ signing_key:
355
374
  specification_version: 4
356
375
  summary: OpenTracing instrumentation for popular ruby libraries
357
376
  test_files: []