opentelemetry-instrumentation-ethon 0.26.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +105 -98
- data/README.md +6 -10
- data/lib/opentelemetry/instrumentation/ethon/http_helper.rb +77 -29
- data/lib/opentelemetry/instrumentation/ethon/instrumentation.rb +9 -3
- data/lib/opentelemetry/instrumentation/ethon/patches/dup/easy.rb +3 -9
- data/lib/opentelemetry/instrumentation/ethon/patches/old/easy.rb +3 -7
- data/lib/opentelemetry/instrumentation/ethon/patches/stable/easy.rb +3 -8
- data/lib/opentelemetry/instrumentation/ethon/version.rb +1 -1
- metadata +7 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4fb5ce65aa3e65913e1a7b2db2465e3ea00acd4fb126600a5943837e9097b61a
|
|
4
|
+
data.tar.gz: 6a453a431e16fad6f54dc53b61b28d249c50b30f4442cb710dc688ec03b044a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3af279395465991f72c7ab16a9c4bd375c070d91b77b4426042e0445fca0de3365e79d38953cb5b65b1a8a28cde2721c81730a4ca8210ff0be6a5d519e1c4aa4
|
|
7
|
+
data.tar.gz: e5fe1b7e99416c21156e64cc80c0b8433281086e32ca7298052fda1f57363757c08c77f1af345f61a62edd865f106aa8d9d82a674fe0c6263b88b8995813d4f3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,185 +1,192 @@
|
|
|
1
1
|
# Release History: opentelemetry-instrumentation-ethon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## v0.29.0 / 2026-04-14
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- BREAKING CHANGE: Min Ruby Version 3.3 (#2125)
|
|
6
|
+
- ADDED: Min Ruby Version 3.3 (#2125)
|
|
7
|
+
- ADDED: Add release tag into source code url of gem metadata (#1984)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## v0.28.0 / 2026-03-17
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
- BREAKING CHANGE: Default to stable HTTP semantic conventions (#2051)
|
|
12
|
+
- ADDED: Default to stable HTTP semantic conventions (#2051)
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
## v0.27.0 / 2026-01-13
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
- ADDED: HTTP Client Semconv v1.17 Span Naming
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
## v0.26.0 / 2025-11-26
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
- BREAKING CHANGE: Update Ethon span name when unknown method
|
|
21
|
+
- ADDED: Update Ethon span name when unknown method
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
## v0.25.1 / 2025-11-25
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
- FIXED: Update support for unknown HTTP methods to match semantic conventions
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
## v0.25.0 / 2025-10-22
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
- BREAKING CHANGE: Min Ruby Version 3.2
|
|
30
|
+
- ADDED: Min Ruby Version 3.2
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
## v0.24.2 / 2025-10-14
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
- FIXED: Raise original Ethon error after span updates
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
## v0.24.1 / 2025-09-30
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
- FIXED: Min OTel Ruby API 1.7
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
## v0.24.0 / 2025-09-30
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
- ADDED: Bump minimum API Version to 1.7
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
## v0.23.1 / 2025-09-02
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
- FIXED: Improve Ethon exception handling
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
## v0.23.0 / 2025-08-13
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
- ADDED: Add Ethon `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable [#1561](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/1561)
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
## v0.22.0 / 2025-01-16
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
- BREAKING CHANGE: Set minimum supported version to Ruby 3.1
|
|
55
|
+
- ADDED: Set minimum supported version to Ruby 3.1
|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
## v0.21.9 / 2024-11-26
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
- CHANGED: Performance Freeze all range objects #1222
|
|
54
60
|
|
|
55
|
-
|
|
61
|
+
## v0.21.8 / 2024-07-23
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
- DOCS: Add cspell to CI
|
|
58
64
|
|
|
59
|
-
|
|
65
|
+
## v0.21.7 / 2024-06-18
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
- FIXED: Relax otel common gem constraints
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
## v0.21.6 / 2024-06-12
|
|
64
70
|
|
|
65
|
-
|
|
71
|
+
- FIXED: Add net.peer.name to ethon
|
|
66
72
|
|
|
67
|
-
|
|
73
|
+
## v0.21.5 / 2024-05-09
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
- FIXED: Untrace entire request
|
|
70
76
|
|
|
71
|
-
|
|
77
|
+
## v0.21.4 / 2024-04-30
|
|
72
78
|
|
|
73
|
-
|
|
79
|
+
- FIXED: Bundler conflict warnings
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
## v0.21.3 / 2023-11-23
|
|
76
82
|
|
|
77
|
-
|
|
83
|
+
- CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727)
|
|
78
84
|
|
|
79
|
-
|
|
85
|
+
## v0.21.2 / 2023-07-21
|
|
80
86
|
|
|
81
|
-
|
|
87
|
+
- ADDED: Update `opentelemetry-common` from [0.19.3 to 0.20.0](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/537)
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
## v0.21.1 / 2023-06-05
|
|
84
90
|
|
|
85
|
-
|
|
91
|
+
- FIXED: Base config options
|
|
86
92
|
|
|
87
|
-
|
|
93
|
+
## v0.21.0 / 2023-04-17
|
|
88
94
|
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
- BREAKING CHANGE: Drop support for EoL Ruby 2.7
|
|
96
|
+
- ADDED: Drop support for EoL Ruby 2.7
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
## v0.20.1 / 2023-01-14
|
|
93
99
|
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
- DOCS: Fix gem homepage
|
|
101
|
+
- DOCS: More gem documentation fixes
|
|
96
102
|
|
|
97
|
-
|
|
103
|
+
## v0.20.0 / 2022-06-09
|
|
98
104
|
|
|
99
|
-
|
|
105
|
+
- Upgrading Base dependency version
|
|
106
|
+
- FIXED: Broken test file requirements
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
## v0.19.5 / 2022-05-05
|
|
102
109
|
|
|
103
|
-
|
|
110
|
+
- (No significant changes)
|
|
104
111
|
|
|
105
|
-
|
|
112
|
+
## v0.19.4 / 2022-02-02
|
|
106
113
|
|
|
107
|
-
|
|
114
|
+
- FIXED: Excessive hash creation on context attr merging
|
|
108
115
|
|
|
109
|
-
|
|
116
|
+
## v0.19.3 / 2021-12-02
|
|
110
117
|
|
|
111
|
-
|
|
118
|
+
- (No significant changes)
|
|
112
119
|
|
|
113
|
-
|
|
120
|
+
## v0.19.2 / 2021-09-29
|
|
114
121
|
|
|
115
|
-
|
|
122
|
+
- (No significant changes)
|
|
116
123
|
|
|
117
|
-
|
|
124
|
+
## v0.19.1 / 2021-08-12
|
|
118
125
|
|
|
119
|
-
|
|
126
|
+
- DOCS: Update docs to rely more on environment variable configuration
|
|
120
127
|
|
|
121
|
-
|
|
128
|
+
## v0.19.0 / 2021-06-23
|
|
122
129
|
|
|
123
|
-
|
|
130
|
+
- BREAKING CHANGE: Total order constraint on span.status=
|
|
131
|
+
- FIXED: Total order constraint on span.status=
|
|
124
132
|
|
|
125
|
-
|
|
133
|
+
## v0.18.0 / 2021-05-21
|
|
126
134
|
|
|
127
|
-
|
|
135
|
+
- ADDED: Updated API dependency for 1.0.0.rc1
|
|
128
136
|
|
|
129
|
-
|
|
130
|
-
* FIXED: Refactor propagators to add #fields
|
|
137
|
+
## v0.17.0 / 2021-04-22
|
|
131
138
|
|
|
132
|
-
|
|
139
|
+
- ADDED: Ethon instrumentation accepts peer service config attribute.
|
|
140
|
+
- FIXED: Refactor propagators to add #fields
|
|
133
141
|
|
|
134
|
-
|
|
135
|
-
* FIXED: Example scripts now reference local common lib
|
|
136
|
-
* DOCS: Replace Gitter with GitHub Discussions
|
|
142
|
+
## v0.16.0 / 2021-03-17
|
|
137
143
|
|
|
138
|
-
|
|
144
|
+
- FIXED: Remove passwords from http.url
|
|
145
|
+
- FIXED: Example scripts now reference local common lib
|
|
146
|
+
- DOCS: Replace Gitter with GitHub Discussions
|
|
139
147
|
|
|
140
|
-
|
|
148
|
+
## v0.15.0 / 2021-02-18
|
|
141
149
|
|
|
142
|
-
|
|
150
|
+
- (No significant changes)
|
|
143
151
|
|
|
144
|
-
|
|
152
|
+
## v0.14.0 / 2021-02-03
|
|
145
153
|
|
|
146
|
-
|
|
154
|
+
- BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
|
155
|
+
- ADDED: Replace getter and setter callables and remove rack specific propagators
|
|
147
156
|
|
|
148
|
-
|
|
157
|
+
## v0.13.0 / 2021-01-29
|
|
149
158
|
|
|
150
|
-
|
|
159
|
+
- (No significant changes)
|
|
151
160
|
|
|
152
|
-
|
|
161
|
+
## v0.12.0 / 2020-12-24
|
|
153
162
|
|
|
154
|
-
|
|
163
|
+
- (No significant changes)
|
|
155
164
|
|
|
156
|
-
|
|
165
|
+
## v0.11.0 / 2020-12-11
|
|
157
166
|
|
|
158
|
-
|
|
167
|
+
- FIXED: Copyright comments to not reference year
|
|
159
168
|
|
|
160
|
-
|
|
169
|
+
## v0.10.0 / 2020-12-03
|
|
161
170
|
|
|
162
|
-
|
|
171
|
+
- (No significant changes)
|
|
163
172
|
|
|
164
|
-
|
|
173
|
+
## v0.9.0 / 2020-11-27
|
|
165
174
|
|
|
166
|
-
|
|
175
|
+
- BREAKING CHANGE: Add timeout for force_flush and shutdown
|
|
176
|
+
- ADDED: Add timeout for force_flush and shutdown
|
|
167
177
|
|
|
168
|
-
|
|
178
|
+
## v0.8.0 / 2020-10-27
|
|
169
179
|
|
|
170
|
-
|
|
180
|
+
- BREAKING CHANGE: Move context/span methods to Trace module
|
|
181
|
+
- BREAKING CHANGE: Remove 'canonical' from status codes
|
|
182
|
+
- FIXED: Move context/span methods to Trace module
|
|
183
|
+
- FIXED: Remove 'canonical' from status codes
|
|
171
184
|
|
|
172
|
-
|
|
173
|
-
* BREAKING CHANGE: Remove 'canonical' from status codes
|
|
185
|
+
## v0.7.0 / 2020-10-07
|
|
174
186
|
|
|
175
|
-
|
|
176
|
-
|
|
187
|
+
- DOCS: Add README for Ethon
|
|
188
|
+
- DOCS: Standardize top-level docs structure and readme
|
|
177
189
|
|
|
178
|
-
|
|
190
|
+
## v0.6.0 / 2020-09-10
|
|
179
191
|
|
|
180
|
-
|
|
181
|
-
* DOCS: Standardize top-level docs structure and readme
|
|
182
|
-
|
|
183
|
-
### v0.6.0 / 2020-09-10
|
|
184
|
-
|
|
185
|
-
* (No significant changes)
|
|
192
|
+
- (No significant changes)
|
data/README.md
CHANGED
|
@@ -44,7 +44,7 @@ The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special int
|
|
|
44
44
|
|
|
45
45
|
The `opentelemetry-instrumentation-all` gem is distributed under the Apache 2.0 license. See [LICENSE][license-github] for more information.
|
|
46
46
|
|
|
47
|
-
[ethon-home]:https://github.com/typhoeus/ethon
|
|
47
|
+
[ethon-home]: https://github.com/typhoeus/ethon
|
|
48
48
|
[bundler-home]: https://bundler.io
|
|
49
49
|
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
|
|
50
50
|
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
|
|
@@ -55,16 +55,12 @@ The `opentelemetry-instrumentation-all` gem is distributed under the Apache 2.0
|
|
|
55
55
|
|
|
56
56
|
## HTTP semantic convention stability
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
To facilitate the migration to stable semantic conventions, you can use the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable. This variable allows you to opt-in to the new stable conventions, ensuring compatibility and future-proofing your instrumentation.
|
|
58
|
+
This instrumentation by default emits the stable HTTP semantic conventions. The `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable can be used to opt-in to the old or duplicate (both old and stable) semantic conventions.
|
|
61
59
|
|
|
62
60
|
When setting the value for `OTEL_SEMCONV_STABILITY_OPT_IN`, you can specify which conventions you wish to adopt:
|
|
63
61
|
|
|
64
|
-
- `http` - Emits the stable HTTP and networking conventions
|
|
65
|
-
- `http/dup` - Emits both the old and stable HTTP and networking conventions
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
During the transition from old to stable conventions, Ethon instrumentation code comes in three patch versions: `dup`, `old`, and `stable`. These versions are identical except for the attributes they send. Any changes to Ethon instrumentation should consider all three patches.
|
|
62
|
+
- `http` - Emits the stable HTTP and networking conventions.
|
|
63
|
+
- `http/dup` - **DEPRECATED: Will be removed on April 15, 2026.** Emits both the old and stable HTTP and networking conventions.
|
|
64
|
+
- `old` - **DEPRECATED: Will be removed on April 15, 2026.** Emits the old HTTP and networking conventions.
|
|
69
65
|
|
|
70
|
-
For additional information on migration, please refer to our [documentation](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/).
|
|
66
|
+
For additional information on migration, please refer to our [documentation](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/).
|
|
@@ -11,7 +11,7 @@ module OpenTelemetry
|
|
|
11
11
|
# @api private
|
|
12
12
|
module HttpHelper
|
|
13
13
|
# Lightweight struct to hold span creation attributes
|
|
14
|
-
SpanCreationAttributes = Struct.new(:span_name, :
|
|
14
|
+
SpanCreationAttributes = Struct.new(:span_name, :attributes)
|
|
15
15
|
|
|
16
16
|
# Pre-computed mapping to avoid string allocations during normalization
|
|
17
17
|
METHOD_CACHE = {
|
|
@@ -44,41 +44,89 @@ module OpenTelemetry
|
|
|
44
44
|
:trace => 'TRACE'
|
|
45
45
|
}.freeze
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'HEAD' => 'HTTP HEAD',
|
|
53
|
-
'OPTIONS' => 'HTTP OPTIONS',
|
|
54
|
-
'PATCH' => 'HTTP PATCH',
|
|
55
|
-
'POST' => 'HTTP POST',
|
|
56
|
-
'PUT' => 'HTTP PUT',
|
|
57
|
-
'TRACE' => 'HTTP TRACE'
|
|
58
|
-
}.freeze
|
|
47
|
+
private_constant :METHOD_CACHE
|
|
48
|
+
|
|
49
|
+
OLD_SPAN_NAMES_BY_METHOD = METHOD_CACHE.values.uniq.to_h do |method|
|
|
50
|
+
[method, "HTTP #{method}"]
|
|
51
|
+
end.freeze
|
|
59
52
|
|
|
60
|
-
private_constant :
|
|
53
|
+
private_constant :OLD_SPAN_NAMES_BY_METHOD
|
|
61
54
|
|
|
62
|
-
# Prepares
|
|
55
|
+
# Prepares span data using old semantic conventions
|
|
63
56
|
# @param method [String, Symbol] The HTTP method
|
|
64
|
-
# @
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
# @return [SpanCreationAttributes] struct containing span_name and attributes hash
|
|
58
|
+
def self.span_attrs_for_old(method)
|
|
59
|
+
client_context_attrs = OpenTelemetry::Common::HTTP::ClientContext.attributes
|
|
67
60
|
normalized = METHOD_CACHE[method]
|
|
61
|
+
attributes = client_context_attrs.dup
|
|
62
|
+
|
|
63
|
+
# Determine base span name and method value
|
|
64
|
+
if normalized
|
|
65
|
+
span_name = OLD_SPAN_NAMES_BY_METHOD[normalized]
|
|
66
|
+
method_value = normalized
|
|
67
|
+
else
|
|
68
|
+
span_name = 'HTTP'
|
|
69
|
+
method_value = '_OTHER'
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
attributes['http.method'] ||= method_value
|
|
73
|
+
|
|
74
|
+
SpanCreationAttributes.new(span_name: span_name, attributes: attributes)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Prepares span data using stable semantic conventions
|
|
78
|
+
# @param method [String, Symbol] The HTTP method
|
|
79
|
+
# @return [SpanCreationAttributes] struct containing span_name and attributes hash
|
|
80
|
+
def self.span_attrs_for_stable(method)
|
|
81
|
+
client_context_attrs = OpenTelemetry::Common::HTTP::ClientContext.attributes
|
|
82
|
+
url_template = client_context_attrs['url.template']
|
|
83
|
+
normalized = METHOD_CACHE[method]
|
|
84
|
+
attributes = client_context_attrs.dup
|
|
85
|
+
|
|
86
|
+
# Determine base span name and method value
|
|
68
87
|
if normalized
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
normalized_method: normalized,
|
|
73
|
-
original_method: nil
|
|
74
|
-
)
|
|
88
|
+
base_name = normalized
|
|
89
|
+
method_value = normalized
|
|
90
|
+
original = nil
|
|
75
91
|
else
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
original_method: method.to_s
|
|
80
|
-
)
|
|
92
|
+
base_name = 'HTTP'
|
|
93
|
+
method_value = '_OTHER'
|
|
94
|
+
original = method.to_s
|
|
81
95
|
end
|
|
96
|
+
|
|
97
|
+
span_name = url_template ? "#{base_name} #{url_template}" : base_name
|
|
98
|
+
attributes['http.request.method'] ||= method_value
|
|
99
|
+
attributes['http.request.method_original'] ||= original if original
|
|
100
|
+
|
|
101
|
+
SpanCreationAttributes.new(span_name: span_name, attributes: attributes)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Prepares span data using both old and stable semantic conventions
|
|
105
|
+
# @param method [String, Symbol] The HTTP method
|
|
106
|
+
# @return [SpanCreationAttributes] struct containing span_name and attributes hash
|
|
107
|
+
def self.span_attrs_for_dup(method)
|
|
108
|
+
client_context_attrs = OpenTelemetry::Common::HTTP::ClientContext.attributes
|
|
109
|
+
url_template = client_context_attrs['url.template']
|
|
110
|
+
normalized = METHOD_CACHE[method]
|
|
111
|
+
attributes = client_context_attrs.dup
|
|
112
|
+
|
|
113
|
+
# Determine base span name and method value
|
|
114
|
+
if normalized
|
|
115
|
+
base_name = normalized
|
|
116
|
+
method_value = normalized
|
|
117
|
+
original = nil
|
|
118
|
+
else
|
|
119
|
+
base_name = 'HTTP'
|
|
120
|
+
method_value = '_OTHER'
|
|
121
|
+
original = method.to_s
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
span_name = url_template ? "#{base_name} #{url_template}" : base_name
|
|
125
|
+
attributes['http.method'] ||= method_value
|
|
126
|
+
attributes['http.request.method'] ||= method_value
|
|
127
|
+
attributes['http.request.method_original'] ||= original if original
|
|
128
|
+
|
|
129
|
+
SpanCreationAttributes.new(span_name: span_name, attributes: attributes)
|
|
82
130
|
end
|
|
83
131
|
end
|
|
84
132
|
end
|
|
@@ -29,14 +29,20 @@ module OpenTelemetry
|
|
|
29
29
|
values = stability_opt_in.split(',').map(&:strip)
|
|
30
30
|
|
|
31
31
|
if values.include?('http/dup')
|
|
32
|
+
emit_old_semconv_deprecation_warning('http/dup')
|
|
32
33
|
'dup'
|
|
33
|
-
elsif values.include?('
|
|
34
|
-
'
|
|
35
|
-
else
|
|
34
|
+
elsif values.include?('old')
|
|
35
|
+
emit_old_semconv_deprecation_warning('old')
|
|
36
36
|
'old'
|
|
37
|
+
else
|
|
38
|
+
'stable'
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
|
|
42
|
+
def emit_old_semconv_deprecation_warning(option)
|
|
43
|
+
OpenTelemetry.logger.warn("The `#{option}` option for OTEL_SEMCONV_STABILITY_OPT_IN is deprecated and will be removed on April 15, 2026. Please migrate to the stable HTTP semantic conventions.")
|
|
44
|
+
end
|
|
45
|
+
|
|
40
46
|
def require_dependencies_dup
|
|
41
47
|
require_relative 'patches/dup/easy'
|
|
42
48
|
require_relative 'patches/multi'
|
|
@@ -68,7 +68,7 @@ module OpenTelemetry
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def otel_before_request
|
|
71
|
-
span_data = HttpHelper.
|
|
71
|
+
span_data = HttpHelper.span_attrs_for_dup(@otel_method)
|
|
72
72
|
|
|
73
73
|
@otel_span = tracer.start_span(
|
|
74
74
|
span_data.span_name,
|
|
@@ -90,11 +90,7 @@ module OpenTelemetry
|
|
|
90
90
|
private
|
|
91
91
|
|
|
92
92
|
def span_creation_attributes(span_data)
|
|
93
|
-
instrumentation_attrs = {
|
|
94
|
-
'http.method' => span_data.normalized_method,
|
|
95
|
-
'http.request.method' => span_data.normalized_method
|
|
96
|
-
}
|
|
97
|
-
instrumentation_attrs['http.request.method_original'] = span_data.original_method if span_data.original_method
|
|
93
|
+
instrumentation_attrs = {}
|
|
98
94
|
|
|
99
95
|
uri = _otel_cleanse_uri(url)
|
|
100
96
|
if uri
|
|
@@ -106,9 +102,7 @@ module OpenTelemetry
|
|
|
106
102
|
|
|
107
103
|
config = Ethon::Instrumentation.instance.config
|
|
108
104
|
instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
|
|
109
|
-
instrumentation_attrs.merge!(
|
|
110
|
-
OpenTelemetry::Common::HTTP::ClientContext.attributes
|
|
111
|
-
)
|
|
105
|
+
instrumentation_attrs.merge!(span_data.attributes)
|
|
112
106
|
end
|
|
113
107
|
|
|
114
108
|
# Returns a URL string with userinfo removed.
|
|
@@ -67,7 +67,7 @@ module OpenTelemetry
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def otel_before_request
|
|
70
|
-
span_data = HttpHelper.
|
|
70
|
+
span_data = HttpHelper.span_attrs_for_old(@otel_method)
|
|
71
71
|
|
|
72
72
|
@otel_span = tracer.start_span(
|
|
73
73
|
span_data.span_name,
|
|
@@ -89,9 +89,7 @@ module OpenTelemetry
|
|
|
89
89
|
private
|
|
90
90
|
|
|
91
91
|
def span_creation_attributes(span_data)
|
|
92
|
-
instrumentation_attrs = {
|
|
93
|
-
'http.method' => span_data.normalized_method
|
|
94
|
-
}
|
|
92
|
+
instrumentation_attrs = {}
|
|
95
93
|
|
|
96
94
|
uri = _otel_cleanse_uri(url)
|
|
97
95
|
if uri
|
|
@@ -101,9 +99,7 @@ module OpenTelemetry
|
|
|
101
99
|
|
|
102
100
|
config = Ethon::Instrumentation.instance.config
|
|
103
101
|
instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
|
|
104
|
-
instrumentation_attrs.merge!(
|
|
105
|
-
OpenTelemetry::Common::HTTP::ClientContext.attributes
|
|
106
|
-
)
|
|
102
|
+
instrumentation_attrs.merge!(span_data.attributes)
|
|
107
103
|
end
|
|
108
104
|
|
|
109
105
|
# Returns a URL string with userinfo removed.
|
|
@@ -67,7 +67,7 @@ module OpenTelemetry
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def otel_before_request
|
|
70
|
-
span_data = HttpHelper.
|
|
70
|
+
span_data = HttpHelper.span_attrs_for_stable(@otel_method)
|
|
71
71
|
|
|
72
72
|
@otel_span = tracer.start_span(
|
|
73
73
|
span_data.span_name,
|
|
@@ -89,10 +89,7 @@ module OpenTelemetry
|
|
|
89
89
|
private
|
|
90
90
|
|
|
91
91
|
def span_creation_attributes(span_data)
|
|
92
|
-
instrumentation_attrs = {
|
|
93
|
-
'http.request.method' => span_data.normalized_method
|
|
94
|
-
}
|
|
95
|
-
instrumentation_attrs['http.request.method_original'] = span_data.original_method if span_data.original_method
|
|
92
|
+
instrumentation_attrs = {}
|
|
96
93
|
|
|
97
94
|
uri = _otel_cleanse_uri(url)
|
|
98
95
|
if uri
|
|
@@ -102,9 +99,7 @@ module OpenTelemetry
|
|
|
102
99
|
|
|
103
100
|
config = Ethon::Instrumentation.instance.config
|
|
104
101
|
instrumentation_attrs['peer.service'] = config[:peer_service] if config[:peer_service]
|
|
105
|
-
instrumentation_attrs.merge!(
|
|
106
|
-
OpenTelemetry::Common::HTTP::ClientContext.attributes
|
|
107
|
-
)
|
|
102
|
+
instrumentation_attrs.merge!(span_data.attributes)
|
|
108
103
|
end
|
|
109
104
|
|
|
110
105
|
# Returns a URL string with userinfo removed.
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opentelemetry-instrumentation-ethon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.29.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenTelemetry Authors
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: opentelemetry-instrumentation-base
|
|
@@ -49,11 +48,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
|
49
48
|
licenses:
|
|
50
49
|
- Apache-2.0
|
|
51
50
|
metadata:
|
|
52
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.
|
|
53
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/
|
|
51
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.29.0/file/CHANGELOG.md
|
|
52
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-ethon/v0.29.0/instrumentation/ethon
|
|
54
53
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
|
55
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.
|
|
56
|
-
post_install_message:
|
|
54
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-ethon/0.29.0
|
|
57
55
|
rdoc_options: []
|
|
58
56
|
require_paths:
|
|
59
57
|
- lib
|
|
@@ -61,15 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
61
59
|
requirements:
|
|
62
60
|
- - ">="
|
|
63
61
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: '3.
|
|
62
|
+
version: '3.3'
|
|
65
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
64
|
requirements:
|
|
67
65
|
- - ">="
|
|
68
66
|
- !ruby/object:Gem::Version
|
|
69
67
|
version: '0'
|
|
70
68
|
requirements: []
|
|
71
|
-
rubygems_version:
|
|
72
|
-
signing_key:
|
|
69
|
+
rubygems_version: 4.0.6
|
|
73
70
|
specification_version: 4
|
|
74
71
|
summary: Ethon instrumentation for the OpenTelemetry framework
|
|
75
72
|
test_files: []
|