httprb-opentracing 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +2 -2
- data/lib/http/tracer.rb +11 -0
- data/lib/http/tracer/version.rb +1 -1
- data/ruby-httprb-instrumentation.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bf38fad046ca78c97615669a37e476a608c2ee3
|
4
|
+
data.tar.gz: c4dc61191f5b0ecf7c7d14e1e8d3175dc6b46c6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b93df493c30cda2e24f31c1e6f0f280e3c279a334076833e712ff54691340abbe8865bed95ae59bd8873d7415b00f53731b2a1bde6a336011d4023a18d91c9ed
|
7
|
+
data.tar.gz: 91bbae677fcfb5c3afa3dc86411107bff2edfa7f16321e0420663278ca6f2c7345af94731168e6f807edb262fcf3f75d4b261836449ac48411448a3b525847e3
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
httprb-opentracing (0.
|
5
|
-
http (> 0.1.0)
|
4
|
+
httprb-opentracing (0.2.0)
|
6
5
|
opentracing (~> 0.5.0)
|
7
6
|
|
8
7
|
GEM
|
@@ -59,6 +58,7 @@ PLATFORMS
|
|
59
58
|
DEPENDENCIES
|
60
59
|
bundler (~> 2.0)
|
61
60
|
byebug
|
61
|
+
http (> 0.1.0)
|
62
62
|
httprb-opentracing!
|
63
63
|
opentracing_test_tracer (~> 0.1)
|
64
64
|
rake (~> 10.0)
|
data/lib/http/tracer.rb
CHANGED
@@ -11,11 +11,22 @@ module HTTP
|
|
11
11
|
IngoreRequest = ->(_verb, _uri, _opts) { false }
|
12
12
|
|
13
13
|
def instrument(tracer: OpenTracing.global_tracer, ignore_request: IngoreRequest)
|
14
|
+
begin
|
15
|
+
require 'http'
|
16
|
+
rescue LoadError
|
17
|
+
return
|
18
|
+
end
|
19
|
+
raise IncompatibleGemVersion unless compatible_version?
|
20
|
+
|
14
21
|
@ignore_request = ignore_request
|
15
22
|
@tracer = tracer
|
16
23
|
patch_request
|
17
24
|
end
|
18
25
|
|
26
|
+
def compatible_version?
|
27
|
+
Gem::Version.new(HTTP::VERSION) >= Gem::Version.new("0.1.0")
|
28
|
+
end
|
29
|
+
|
19
30
|
def remove
|
20
31
|
return unless ::HTTP::Client.method_defined?(:request_original)
|
21
32
|
|
data/lib/http/tracer/version.rb
CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.require_paths = ["lib"]
|
38
38
|
|
39
39
|
spec.add_dependency "opentracing", "~> 0.5.0"
|
40
|
-
spec.
|
40
|
+
spec.add_development_dependency "http", "> 0.1.0"
|
41
41
|
spec.add_development_dependency "bundler", "~> 2.0"
|
42
42
|
spec.add_development_dependency "rake", "~> 10.0"
|
43
43
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httprb-opentracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Fischer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
- - ">"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.1.0
|
34
|
-
type: :
|
34
|
+
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|