opentelemetry-instrumentation-ethon 0.13.0 → 0.18.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: a28d82954460ea0a6d04c606c6486d1ecffb2790d35e25bcc26f30cb2ffa2826
4
- data.tar.gz: ebbc9eadd8ce4a260609db71b58a145b3327158ed3b166722a9e1ceac3877f88
3
+ metadata.gz: 84c0fbd8d43af6e2b08cdb217d644a2464b29f5d9d5a6aef4e4fad1580d315d9
4
+ data.tar.gz: 5078317ce6cf5a8044d2d04f8bdcb5d99937fde391c2306abeb515883d2bea06
5
5
  SHA512:
6
- metadata.gz: c6ef934a5a2bd1d159fc2091b8eef8f425c8c3e536abdef8b49a868f5b30218508878ceb4a8d5078d6b2ef1e32b9feb5200e94477a9090377250d493f5431254
7
- data.tar.gz: 750ca88709e9651faf81e81dbc37dbe743257e65d5032b04694e1913b8d22335aed066a8f7c9bf8b58ed3c8cd3a827408bfb2d2d26dd10100552b0a1d20b66b6
6
+ metadata.gz: f2311d833ca6c2fd855b312c39c92a3d8bc399121d4464517b198e5af249a52fefdc61e1cac828dba30ab50674bc9ded2c10d72982f49289bae10dcb8985d0d3
7
+ data.tar.gz: bea82b1713b5eea1e8e3c15af2897655a2d788880d018d9c69280fe26ca2f3344defdcbb51f4aae20fbd32a54904062f34acf2256e97f4021c7f9d1895708aca
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Release History: opentelemetry-instrumentation-ethon
2
2
 
3
+ ### v0.18.0 / 2021-05-21
4
+
5
+ * ADDED: Updated API depedency for 1.0.0.rc1
6
+
7
+ ### v0.17.0 / 2021-04-22
8
+
9
+ * ADDED: Ethon instrumentation accepts peer service config attribute.
10
+ * FIXED: Refactor propagators to add #fields
11
+
12
+ ### v0.16.0 / 2021-03-17
13
+
14
+ * FIXED: Remove passwords from http.url
15
+ * FIXED: Example scripts now reference local common lib
16
+ * DOCS: Replace Gitter with GitHub Discussions
17
+
18
+ ### v0.15.0 / 2021-02-18
19
+
20
+ * (No significant changes)
21
+
22
+ ### v0.14.0 / 2021-02-03
23
+
24
+ * BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
25
+
26
+ * ADDED: Replace getter and setter callables and remove rack specific propagators
27
+
3
28
  ### v0.13.0 / 2021-01-29
4
29
 
5
30
  * (No significant changes)
@@ -10,7 +35,7 @@
10
35
 
11
36
  ### v0.11.0 / 2020-12-11
12
37
 
13
- * FIXED: Copyright comments to not reference year
38
+ * FIXED: Copyright comments to not reference year
14
39
 
15
40
  ### v0.10.0 / 2020-12-03
16
41
 
@@ -18,22 +43,22 @@
18
43
 
19
44
  ### v0.9.0 / 2020-11-27
20
45
 
21
- * BREAKING CHANGE: Add timeout for force_flush and shutdown
46
+ * BREAKING CHANGE: Add timeout for force_flush and shutdown
22
47
 
23
- * ADDED: Add timeout for force_flush and shutdown
48
+ * ADDED: Add timeout for force_flush and shutdown
24
49
 
25
50
  ### v0.8.0 / 2020-10-27
26
51
 
27
- * BREAKING CHANGE: Move context/span methods to Trace module
28
- * BREAKING CHANGE: Remove 'canonical' from status codes
52
+ * BREAKING CHANGE: Move context/span methods to Trace module
53
+ * BREAKING CHANGE: Remove 'canonical' from status codes
29
54
 
30
- * FIXED: Move context/span methods to Trace module
31
- * FIXED: Remove 'canonical' from status codes
55
+ * FIXED: Move context/span methods to Trace module
56
+ * FIXED: Remove 'canonical' from status codes
32
57
 
33
58
  ### v0.7.0 / 2020-10-07
34
59
 
35
- * DOCS: Add README for Ethon
36
- * DOCS: Standardize toplevel docs structure and readme
60
+ * DOCS: Add README for Ethon
61
+ * DOCS: Standardize toplevel docs structure and readme
37
62
 
38
63
  ### v0.6.0 / 2020-09-10
39
64
 
data/README.md CHANGED
@@ -38,7 +38,7 @@ Example usage of faraday can be seen in the `./example/ethon.rb` file [here](htt
38
38
 
39
39
  The `opentelemetry-instrumentation-ethon` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
40
40
 
41
- The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us on our [gitter channel][ruby-gitter] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
41
+ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
42
42
 
43
43
  ## License
44
44
 
@@ -51,4 +51,4 @@ The `opentelemetry-instrumentation-all` gem is distributed under the Apache 2.0
51
51
  [license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/main/LICENSE
52
52
  [ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
53
53
  [community-meetings]: https://github.com/open-telemetry/community#community-meetings
54
- [ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby
54
+ [discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
@@ -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,16 +70,13 @@ 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' => url
76
- },
73
+ attributes: span_creation_attributes(method),
77
74
  kind: :client
78
75
  )
79
76
 
80
77
  @otel_original_headers ||= {}
81
78
  OpenTelemetry::Trace.with_span(@otel_span) do
82
- OpenTelemetry.propagation.http.inject(@otel_original_headers)
79
+ OpenTelemetry.propagation.inject(@otel_original_headers)
83
80
  end
84
81
  self.headers = @otel_original_headers
85
82
  end
@@ -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.13.0'
10
+ VERSION = '0.18.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.13.0
4
+ version: 0.18.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-01-30 00:00:00.000000000 Z
11
+ date: 2021-05-21 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.13.0
19
+ version: 1.0.0.rc1
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.13.0
26
+ version: 1.0.0.rc1
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.18.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.18.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.18.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.18.0
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: appraisal
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +114,14 @@ dependencies:
86
114
  requirements:
87
115
  - - "~>"
88
116
  - !ruby/object:Gem::Version
89
- version: '0.0'
117
+ version: 1.0.0.rc1
90
118
  type: :development
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
93
121
  requirements:
94
122
  - - "~>"
95
123
  - !ruby/object:Gem::Version
96
- version: '0.0'
124
+ version: 1.0.0.rc1
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: rubocop
99
127
  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.13.0/file.CHANGELOG.html
203
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-ethon/v0.18.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.13.0
206
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-ethon/v0.18.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