signalfx-nethttp-instrumentation 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf710458e70a19c7532d2df0af112efaf19f66ab86de63eb050cf1708bfa40f1
4
- data.tar.gz: 6752bed8f53581c8245c666620b192d899354898875125a14be5325e8bdf5f1d
3
+ metadata.gz: 7f066a34e6f89551205876adce3a89bda742eea2eff44cc68e2081ed31897886
4
+ data.tar.gz: e17895932aa07ef19be4f3db6d153fd8b9d36bef0d4ca0416b385b05f2fb9a7a
5
5
  SHA512:
6
- metadata.gz: 9094b5fcfa7ffe576177188f9c0bcfaa7e493b3d131b098cb36cf6a39bda0e4924404c7e8f4b26b2fa125bc9d140c91849c56bbc89056c7e52baf598ca24c0ee
7
- data.tar.gz: '064879cc17caa664b33e3208c5a25c655cb231554cb823f03200796cde646a715ebe98571e11011361b5a42c7681f6f44b05170939222324b614f93424b0f95f'
6
+ metadata.gz: d0712811f7143c0e9ce7a091c54fb6e88b175539aeb7a3336b9ee1f5b2ff72fc1e001c57c9ec29294b67d7c02cfaf056d5fd7ce0ba360a56541c9fafad3d0558
7
+ data.tar.gz: d04f99753c332385e575ac56ee633b64a4eda56c38176fffd37c932318d476dbb68040d9d47eaced41641c6c7fa6dc2b8fe56b92bd4176d4e36337f79c73249a
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ /*.gem
1
2
  /vendor/
2
3
  /.bundle/
3
4
  /.yardoc
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- signalfx-nethttp-instrumentation (0.1.0)
4
+ signalfx-nethttp-instrumentation (0.2.0)
5
5
  opentracing (~> 0.3)
6
6
 
7
7
  GEM
@@ -45,11 +45,25 @@ module Net
45
45
 
46
46
  res = request_original(req, body, &block)
47
47
  else
48
+ if req.uri
49
+ url = req.uri.to_s
50
+ else
51
+ if @address
52
+ uri = URI(@address)
53
+ if uri.relative?
54
+ url = @address + req.path
55
+ else
56
+ url = (uri + req.path).to_s
57
+ end
58
+ else
59
+ url = req.path
60
+ end
61
+ end
48
62
  tags = {
49
63
  "component" => "Net::HTTP",
50
64
  "span.kind" => "client",
51
65
  "http.method" => req.method,
52
- "http.url" => req.path,
66
+ "http.url" => url,
53
67
  "peer.host" => @address,
54
68
  "peer.port" => @port,
55
69
  }
@@ -1,7 +1,7 @@
1
1
  module Net
2
2
  module Http
3
3
  module Instrumentation
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signalfx-nethttp-instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashwin Chandrasekar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-02 00:00:00.000000000 Z
11
+ date: 2020-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentracing