httprb-opentracing 0.2.0 → 0.3.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: 9bf38fad046ca78c97615669a37e476a608c2ee3
4
- data.tar.gz: c4dc61191f5b0ecf7c7d14e1e8d3175dc6b46c6a
3
+ metadata.gz: 50b18a2d9a0feda14fd4a6ae95e83990e8d0a8c5
4
+ data.tar.gz: ad8f234aabbdf45219673abb58a118e87a058b53
5
5
  SHA512:
6
- metadata.gz: b93df493c30cda2e24f31c1e6f0f280e3c279a334076833e712ff54691340abbe8865bed95ae59bd8873d7415b00f53731b2a1bde6a336011d4023a18d91c9ed
7
- data.tar.gz: 91bbae677fcfb5c3afa3dc86411107bff2edfa7f16321e0420663278ca6f2c7345af94731168e6f807edb262fcf3f75d4b261836449ac48411448a3b525847e3
6
+ metadata.gz: ab6f34d863c17bba047b8bfc89559d6cf30101e47dd5d8cba50a7109db2c90462ac8be894f0be8f306113da58634979e8d0b9d5bfd7a1daaf042c5016d364b2f
7
+ data.tar.gz: afbe3a44cc99fd5d93887c95174af889a7939f4613893c0de47ff9e4068171d2f01b3566bbd3c2f0c791d27add2324505e0071fb29f13c5126b952b034a26a60
@@ -1,6 +1,9 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 0.3.0 09/06/2019
5
+ * Be defensive with the URI object provided from the client
6
+
4
7
  ## 0.2.0 08/19/2019
5
8
  * Allow use of instrumentation library without using httprb gem
6
9
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- httprb-opentracing (0.2.0)
4
+ httprb-opentracing (0.3.0)
5
5
  opentracing (~> 0.5.0)
6
6
 
7
7
  GEM
@@ -66,4 +66,4 @@ DEPENDENCIES
66
66
  webmock (~> 3.4.2)
67
67
 
68
68
  BUNDLED WITH
69
- 2.0.1
69
+ 2.0.2
@@ -48,13 +48,18 @@ module HTTP
48
48
  if ::HTTP::Tracer.ignore_request.call(verb, uri, options)
49
49
  res = request_original(verb, uri, options)
50
50
  else
51
+ path, host, port = nil
52
+ path = parsed_uri.path if parsed_uri.respond_to?(:path)
53
+ host = parsed_uri.host if parsed_uri.respond_to?(:host)
54
+ port = parsed_uri.port if parsed_uri.respond_to?(:port)
55
+
51
56
  tags = {
52
57
  'component' => 'ruby-httprb',
53
58
  'span.kind' => 'client',
54
59
  'http.method' => verb,
55
- 'http.url' => parsed_uri.path,
56
- 'peer.host' => parsed_uri.host,
57
- 'peer.port' => parsed_uri.port
60
+ 'http.url' => path,
61
+ 'peer.host' => host,
62
+ 'peer.port' => port
58
63
  }
59
64
 
60
65
  tracer = ::HTTP::Tracer.tracer
@@ -2,6 +2,6 @@
2
2
 
3
3
  module HTTP
4
4
  module Tracer
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
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.2.0
4
+ version: 0.3.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-19 00:00:00.000000000 Z
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentracing