opentelemetry-instrumentation-ethon 0.16.0 → 0.17.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: 0ef4d91eae60d932830d11bfb4736f0f336e0b902eeb6b8b3f86a41476ece6d6
4
- data.tar.gz: b5f29b67425ef88844c11318f153c1bdae746e46ccdbdcb8ae7ecf4ba53722e1
3
+ metadata.gz: f067363bf01aa2236036af0dd9f88c10ea3e5d66229c5e986b518984538cc12f
4
+ data.tar.gz: bfce1c39d567278e6f20607a4f1329277dc5bdea01ca0bd440ec113c862a2380
5
5
  SHA512:
6
- metadata.gz: 700bf3fafce4ee6b3502ea766c91c75ff0d1acfe229b9446c22f3afb8b9ba0dd0778199f247d01de6f49414cda26c51ed7e894d21a5be1a915b8b348ec048e2a
7
- data.tar.gz: fd15218a991ca059f37bc754c693e7843eeba4e9ad0c4966e72c9541fbc4fd15418b90e0e7a0d0af82fe8d2ec17b77f7264bd01bc7315e82a4e3201f03efdb25
6
+ metadata.gz: 9f958d51e5659bf85f05fd930599e21db7ac6acb2b8ef437a7c3f02e1d259d5d7a9bdd994a906b178be0a5ee07c275c9e1d8b03e8746ea0b18a8964e87f0ca64
7
+ data.tar.gz: ddaf1735cc2b8ade2c60441a3591538851b83b002370b37d0596b64952f545fe41fc594176b1ba7d4c60b7fd8c95a5aaa1fb800dda1372afa66b9ab9f3483816
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-ethon
2
2
 
3
+ ### v0.17.0 / 2021-04-22
4
+
5
+ * ADDED: Ethon instrumentation accepts peer service config attribute.
6
+ * FIXED: Refactor propagators to add #fields
7
+
3
8
  ### v0.16.0 / 2021-03-17
4
9
 
5
10
  * FIXED: Remove passwords from http.url
@@ -5,6 +5,7 @@
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
7
  require 'opentelemetry'
8
+ require 'opentelemetry-instrumentation-base'
8
9
 
9
10
  module OpenTelemetry
10
11
  module Instrumentation
@@ -19,6 +19,8 @@ module OpenTelemetry
19
19
  defined?(::Ethon::Easy)
20
20
  end
21
21
 
22
+ option :peer_service, default: nil, validate: :string
23
+
22
24
  private
23
25
 
24
26
  def require_dependencies
@@ -70,10 +70,7 @@ module OpenTelemetry
70
70
 
71
71
  @otel_span = tracer.start_span(
72
72
  HTTP_METHODS_TO_SPAN_NAMES[method],
73
- attributes: {
74
- 'http.method' => method,
75
- 'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url)
76
- },
73
+ attributes: span_creation_attributes(method),
77
74
  kind: :client
78
75
  )
79
76
 
@@ -90,6 +87,18 @@ module OpenTelemetry
90
87
 
91
88
  private
92
89
 
90
+ def span_creation_attributes(method)
91
+ instrumentation_attrs = {
92
+ 'http.method' => method,
93
+ 'http.url' => OpenTelemetry::Common::Utilities.cleanse_url(url)
94
+ }
95
+ config = Ethon::Instrumentation.instance.config
96
+ instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
97
+ instrumentation_attrs.merge(
98
+ OpenTelemetry::Common::HTTP::ClientContext.attributes
99
+ )
100
+ end
101
+
93
102
  def tracer
94
103
  Ethon::Instrumentation.instance.tracer
95
104
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Ethon
10
- VERSION = '0.16.0'
10
+ VERSION = '0.17.0'
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.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-22 00:00:00.000000000 Z
11
+ date: 2021-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,14 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.16.0
19
+ version: 0.17.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.16.0
26
+ version: 0.17.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: opentelemetry-common
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.17.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.17.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: opentelemetry-instrumentation-base
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.17.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.17.0
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: appraisal
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -172,10 +200,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
172
200
  licenses:
173
201
  - Apache-2.0
174
202
  metadata:
175
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-ethon/v0.16.0/file.CHANGELOG.html
203
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-ethon/v0.17.0/file.CHANGELOG.html
176
204
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/ethon
177
205
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
178
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-ethon/v0.16.0
206
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-ethon/v0.17.0
179
207
  post_install_message:
180
208
  rdoc_options: []
181
209
  require_paths:
@@ -191,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
219
  - !ruby/object:Gem::Version
192
220
  version: '0'
193
221
  requirements: []
194
- rubygems_version: 3.1.4
222
+ rubygems_version: 3.1.6
195
223
  signing_key:
196
224
  specification_version: 4
197
225
  summary: Ethon instrumentation for the OpenTelemetry framework