opentelemetry-instrumentation-ethon 0.21.5 → 0.21.6

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: 568c52999dac3f59adfa064f8f948533120ffa72b64cb64b4890bdc643238cfb
4
- data.tar.gz: 84baf46219fe34edbb784358527c55cbbc48b4f81d782f7a55d5621740fb6b2b
3
+ metadata.gz: c8c6c3d154d0ef59828119d1b98cbd7c9c16831806ff06452f25e4ad5fbe9993
4
+ data.tar.gz: 39680031c4275ed84730d3aa5945291217c9267874261138f06e32f89e694584
5
5
  SHA512:
6
- metadata.gz: 9f9fa1270b53c8ae049d69845ab6d5309de0cd395092068b4806645c1408dbb9f0b1b2cd1f5f0f73e177ee98d4cf581c5badc64b305f62263bec48bae2d11526
7
- data.tar.gz: 00503f97efe7b8313facc27b9b87ec28f4ba5e419ecf337cb3d6d5e61116f5e97aefd6785aed3946fa2b674df04792046c7bfb145a1d1293aea572856fde6527
6
+ metadata.gz: b47359316c43fd488269217fe180d36ac40099bd5973d9a689d8e9856840d01a02c4654f136adeb2a80750427c50a155ca03c1831940ac265ba545a6dc698385
7
+ data.tar.gz: 467ed73b54bb0cbdeb95e66b00b385350c017a68c265cc0c1c83c7b82cdcdf9cbb987eb0787aeebf057eb18b2820e25a153e7f19870d9287c79de30da623bfd0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-ethon
2
2
 
3
+ ### v0.21.6 / 2024-06-12
4
+
5
+ * FIXED: Add net.peer.name to ethon
6
+
3
7
  ### v0.21.5 / 2024-05-09
4
8
 
5
9
  * FIXED: Untrace entire request
@@ -87,8 +87,11 @@ module OpenTelemetry
87
87
  'http.method' => method
88
88
  }
89
89
 
90
- http_url = OpenTelemetry::Common::Utilities.cleanse_url(url)
91
- instrumentation_attrs['http.url'] = http_url if http_url
90
+ uri = _otel_cleanse_uri(url)
91
+ if uri
92
+ instrumentation_attrs['http.url'] = uri.to_s
93
+ instrumentation_attrs['net.peer.name'] = uri.host if uri.host
94
+ end
92
95
 
93
96
  config = Ethon::Instrumentation.instance.config
94
97
  instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
@@ -97,6 +100,20 @@ module OpenTelemetry
97
100
  )
98
101
  end
99
102
 
103
+ # Returns a URL string with userinfo removed.
104
+ #
105
+ # @param [String] url The URL string to cleanse.
106
+ #
107
+ # @return [String] the cleansed URL.
108
+ def _otel_cleanse_uri(url)
109
+ cleansed_url = URI.parse(url)
110
+ cleansed_url.password = nil
111
+ cleansed_url.user = nil
112
+ cleansed_url
113
+ rescue URI::Error
114
+ nil
115
+ end
116
+
100
117
  def tracer
101
118
  Ethon::Instrumentation.instance.tracer
102
119
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Ethon
10
- VERSION = '0.21.5'
10
+ VERSION = '0.21.6'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-ethon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.5
4
+ version: 0.21.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-09 00:00:00.000000000 Z
11
+ date: 2024-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.62'
131
+ version: 1.64.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.62'
138
+ version: 1.64.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-performance
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -200,10 +200,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
200
200
  licenses:
201
201
  - Apache-2.0
202
202
  metadata:
203
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.21.5/file/CHANGELOG.md
203
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.21.6/file/CHANGELOG.md
204
204
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/ethon
205
205
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
206
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.21.5
206
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.21.6
207
207
  post_install_message:
208
208
  rdoc_options: []
209
209
  require_paths: