opentelemetry-instrumentation-excon 0.26.1 → 0.29.1
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 +103 -92
- data/README.md +5 -10
- data/lib/opentelemetry/instrumentation/excon/http_helper.rb +78 -30
- data/lib/opentelemetry/instrumentation/excon/instrumentation.rb +9 -3
- data/lib/opentelemetry/instrumentation/excon/middlewares/dup/tracer_middleware.rb +2 -5
- data/lib/opentelemetry/instrumentation/excon/middlewares/old/tracer_middleware.rb +2 -3
- data/lib/opentelemetry/instrumentation/excon/middlewares/stable/tracer_middleware.rb +7 -11
- data/lib/opentelemetry/instrumentation/excon/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: 7c8720bbba8248b0bd4bb7501638810fad11ca19dce0041cd4e732a3e635eb59
|
|
4
|
+
data.tar.gz: 5ecf7f4517ba327dd290b3a2a16b8ecc433705dd67d4f495e6a273fd4f65088c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e325b36b8ad45cfa99d024981a2394b169cf83f83a99d745f1e5465669de4b86c861146b920672987e319159d46a93e8f0643755d8c060fd43f6f5afb6d9f1ba
|
|
7
|
+
data.tar.gz: dee7d8e04c2acbe5667ef6ce42d5468c5ed76c7baa81579fe5596fe587f9f4a20651fd9e1aca65267753050c7c4e07957b3bec89ce7ee07d6ae2d835ef8424e8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,177 +1,188 @@
|
|
|
1
1
|
# Release History: opentelemetry-instrumentation-excon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## v0.29.1 / 2026-04-28
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- FIXED: Enable SimpleCov coverage merging across appraisal runs (#2193)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## v0.29.0 / 2026-04-14
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- BREAKING CHANGE: Min Ruby Version 3.3 (#2125)
|
|
10
|
+
- ADDED: Min Ruby Version 3.3 (#2125)
|
|
11
|
+
- ADDED: Add release tag into source code url of gem metadata (#1984)
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
## v0.28.0 / 2026-03-17
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
- BREAKING CHANGE: Default to stable HTTP semantic conventions (#2051)
|
|
16
|
+
- ADDED: Default to stable HTTP semantic conventions (#2051)
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
## v0.27.0 / 2026-01-13
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
- ADDED: HTTP Client Semconv v1.17 Span Naming
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
## v0.26.1 / 2025-11-25
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
- FIXED: Update support for unknown HTTP methods to match semantic conventions
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
## v0.26.0 / 2025-10-22
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
- BREAKING CHANGE: Min Ruby Version 3.2
|
|
29
|
+
- ADDED: Min Ruby Version 3.2
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
## v0.25.2 / 2025-10-11
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
- FIXED: Fixing missing OpenTelemetry::Context detach on Excon instrumentation
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
## v0.25.1 / 2025-09-30
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
- FIXED: Min OTel Ruby API 1.7
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
## v0.25.0 / 2025-09-30
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
- ADDED: Bump minimum API Version to 1.7
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
## v0.24.0 / 2025-08-13
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
- ADDED: Add Excon `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable [#1569](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/1569)
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
## v0.23.0 / 2025-01-16
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
- BREAKING CHANGE: Set minimum supported version to Ruby 3.1
|
|
50
|
+
- ADDED: Set minimum supported version to Ruby 3.1
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
## v0.22.5 / 2024-11-26
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
- CHANGED: Performance Freeze all range objects #1222
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
## v0.22.4 / 2024-07-23
|
|
53
57
|
|
|
54
|
-
|
|
58
|
+
- DOCS: Add cspell to CI
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
## v0.22.3 / 2024-06-18
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
- FIXED: Relax otel common gem constraints
|
|
63
|
+
- FIXED: Add `http.url` to Excon instrumentation
|
|
59
64
|
|
|
60
|
-
|
|
65
|
+
## v0.22.2 / 2024-05-09
|
|
61
66
|
|
|
62
|
-
|
|
67
|
+
- FIXED: Untrace entire request
|
|
63
68
|
|
|
64
|
-
|
|
69
|
+
## v0.22.1 / 2024-04-30
|
|
65
70
|
|
|
66
|
-
|
|
71
|
+
- FIXED: Bundler conflict warnings
|
|
67
72
|
|
|
68
|
-
|
|
73
|
+
## v0.22.0 / 2023-11-28
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
- BREAKING CHANGE: Add a connect span to excon
|
|
76
|
+
- ADDED: Add a connect span to excon
|
|
71
77
|
|
|
72
|
-
|
|
78
|
+
## v0.21.3 / 2023-11-23
|
|
73
79
|
|
|
74
|
-
|
|
80
|
+
- CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727)
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
## v0.21.2 / 2023-07-21
|
|
77
83
|
|
|
78
|
-
|
|
84
|
+
- ADDED: Update `opentelemetry-common` from [0.19.3 to 0.20.0](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/537)
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
## v0.21.1 / 2023-06-05
|
|
81
87
|
|
|
82
|
-
|
|
83
|
-
* DOCS: More gem documentation fixes
|
|
88
|
+
- FIXED: Base config options
|
|
84
89
|
|
|
85
|
-
|
|
90
|
+
## v0.21.0 / 2023-04-17
|
|
86
91
|
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
- BREAKING CHANGE: Drop support for EoL Ruby 2.7
|
|
93
|
+
- ADDED: Drop support for EoL Ruby 2.7
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
## v0.20.1 / 2023-01-14
|
|
91
96
|
|
|
92
|
-
|
|
97
|
+
- DOCS: Fix gem homepage
|
|
98
|
+
- DOCS: More gem documentation fixes
|
|
93
99
|
|
|
94
|
-
|
|
100
|
+
## v0.20.0 / 2022-06-09
|
|
95
101
|
|
|
96
|
-
|
|
102
|
+
- Upgrading Base dependency version
|
|
103
|
+
- FIXED: Broken test file requirements
|
|
97
104
|
|
|
98
|
-
|
|
105
|
+
## v0.19.5 / 2022-05-05
|
|
99
106
|
|
|
100
|
-
|
|
107
|
+
- (No significant changes)
|
|
101
108
|
|
|
102
|
-
|
|
109
|
+
## v0.19.4 / 2022-02-02
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
- FIXED: Excessive hash creation on context attr merging
|
|
105
112
|
|
|
106
|
-
|
|
113
|
+
## v0.19.3 / 2021-12-02
|
|
107
114
|
|
|
108
|
-
|
|
115
|
+
- (No significant changes)
|
|
109
116
|
|
|
110
|
-
|
|
117
|
+
## v0.19.2 / 2021-09-29
|
|
111
118
|
|
|
112
|
-
|
|
119
|
+
- (No significant changes)
|
|
113
120
|
|
|
114
|
-
|
|
121
|
+
## v0.19.1 / 2021-08-12
|
|
115
122
|
|
|
116
|
-
|
|
123
|
+
- DOCS: Update docs to rely more on environment variable configuration
|
|
117
124
|
|
|
118
|
-
|
|
119
|
-
* FIXED: Removed http.status_text attribute #750
|
|
125
|
+
## v0.19.0 / 2021-06-23
|
|
120
126
|
|
|
121
|
-
|
|
127
|
+
- BREAKING CHANGE: Total order constraint on span.status=
|
|
128
|
+
- FIXED: Total order constraint on span.status=
|
|
122
129
|
|
|
123
|
-
|
|
124
|
-
* FIXED: Refactor propagators to add #fields
|
|
130
|
+
## v0.18.0 / 2021-05-21
|
|
125
131
|
|
|
126
|
-
|
|
132
|
+
- ADDED: Updated API dependency for 1.0.0.rc1
|
|
133
|
+
- FIXED: Removed http.status_text attribute #750
|
|
127
134
|
|
|
128
|
-
|
|
129
|
-
* DOCS: Replace Gitter with GitHub Discussions
|
|
135
|
+
## v0.17.0 / 2021-04-22
|
|
130
136
|
|
|
131
|
-
|
|
137
|
+
- ADDED: Excon instrumentation accepts peer service config attribute.
|
|
138
|
+
- FIXED: Refactor propagators to add #fields
|
|
132
139
|
|
|
133
|
-
|
|
140
|
+
## v0.16.0 / 2021-03-17
|
|
134
141
|
|
|
135
|
-
|
|
142
|
+
- FIXED: Example scripts now reference local common lib
|
|
143
|
+
- DOCS: Replace Gitter with GitHub Discussions
|
|
136
144
|
|
|
137
|
-
|
|
145
|
+
## v0.15.0 / 2021-02-18
|
|
138
146
|
|
|
139
|
-
|
|
147
|
+
- (No significant changes)
|
|
140
148
|
|
|
141
|
-
|
|
149
|
+
## v0.14.0 / 2021-02-03
|
|
142
150
|
|
|
143
|
-
|
|
151
|
+
- BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
|
|
152
|
+
- ADDED: Replace getter and setter callables and remove rack specific propagators
|
|
144
153
|
|
|
145
|
-
|
|
154
|
+
## v0.13.0 / 2021-01-29
|
|
146
155
|
|
|
147
|
-
|
|
156
|
+
- (No significant changes)
|
|
148
157
|
|
|
149
|
-
|
|
158
|
+
## v0.12.0 / 2020-12-24
|
|
150
159
|
|
|
151
|
-
|
|
160
|
+
- (No significant changes)
|
|
152
161
|
|
|
153
|
-
|
|
162
|
+
## v0.11.0 / 2020-12-11
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
- FIXED: Copyright comments to not reference year
|
|
156
165
|
|
|
157
|
-
|
|
166
|
+
## v0.10.0 / 2020-12-03
|
|
158
167
|
|
|
159
|
-
|
|
168
|
+
- (No significant changes)
|
|
160
169
|
|
|
161
|
-
|
|
170
|
+
## v0.9.0 / 2020-11-27
|
|
162
171
|
|
|
163
|
-
|
|
172
|
+
- BREAKING CHANGE: Add timeout for force_flush and shutdown
|
|
173
|
+
- ADDED: Add timeout for force_flush and shutdown
|
|
164
174
|
|
|
165
|
-
|
|
166
|
-
* BREAKING CHANGE: Remove 'canonical' from status codes
|
|
175
|
+
## v0.8.0 / 2020-10-27
|
|
167
176
|
|
|
168
|
-
|
|
169
|
-
|
|
177
|
+
- BREAKING CHANGE: Move context/span methods to Trace module
|
|
178
|
+
- BREAKING CHANGE: Remove 'canonical' from status codes
|
|
179
|
+
- FIXED: Move context/span methods to Trace module
|
|
180
|
+
- FIXED: Remove 'canonical' from status codes
|
|
170
181
|
|
|
171
|
-
|
|
182
|
+
## v0.7.0 / 2020-10-07
|
|
172
183
|
|
|
173
|
-
|
|
184
|
+
- DOCS: Standardize top-level docs structure and readme
|
|
174
185
|
|
|
175
|
-
|
|
186
|
+
## v0.6.0 / 2020-09-10
|
|
176
187
|
|
|
177
|
-
|
|
188
|
+
- (No significant changes)
|
data/README.md
CHANGED
|
@@ -49,19 +49,14 @@ The `opentelemetry-instrumentation-all` gem is distributed under the Apache 2.0
|
|
|
49
49
|
[slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
|
|
50
50
|
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
|
|
51
51
|
|
|
52
|
-
|
|
53
52
|
## HTTP semantic convention stability
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
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.
|
|
54
|
+
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.
|
|
58
55
|
|
|
59
56
|
When setting the value for `OTEL_SEMCONV_STABILITY_OPT_IN`, you can specify which conventions you wish to adopt:
|
|
60
57
|
|
|
61
|
-
- `http` - Emits the stable HTTP and networking conventions
|
|
62
|
-
- `http/dup` - Emits both the old and stable HTTP and networking conventions
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
During the transition from old to stable conventions, Excon instrumentation code comes in three patch versions: `dup`, `old`, and `stable`. These versions are identical except for the attributes they send. Any changes to Excon instrumentation should consider all three patches.
|
|
58
|
+
- `http` - Emits the stable HTTP and networking conventions.
|
|
59
|
+
- `http/dup` - **DEPRECATED: Will be removed on April 15, 2026.** Emits both the old and stable HTTP and networking conventions.
|
|
60
|
+
- `old` - **DEPRECATED: Will be removed on April 15, 2026.** Emits the old HTTP and networking conventions.
|
|
66
61
|
|
|
67
|
-
For additional information on migration, please refer to our [documentation](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/).
|
|
62
|
+
For additional information on migration, please refer to our [documentation](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/).
|
|
@@ -10,8 +10,8 @@ module OpenTelemetry
|
|
|
10
10
|
# Utility module for HTTP-related helper methods
|
|
11
11
|
# @api private
|
|
12
12
|
module HttpHelper
|
|
13
|
-
# Lightweight struct to hold span creation
|
|
14
|
-
SpanCreationAttributes = Struct.new(:span_name, :
|
|
13
|
+
# Lightweight struct to hold span creation data
|
|
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
|
|
@@ -34,14 +34,20 @@ module OpenTelemetry
|
|
|
34
34
|
values = stability_opt_in.split(',').map(&:strip)
|
|
35
35
|
|
|
36
36
|
if values.include?('http/dup')
|
|
37
|
+
emit_old_semconv_deprecation_warning('http/dup')
|
|
37
38
|
'dup'
|
|
38
|
-
elsif values.include?('
|
|
39
|
-
'
|
|
40
|
-
else
|
|
39
|
+
elsif values.include?('old')
|
|
40
|
+
emit_old_semconv_deprecation_warning('old')
|
|
41
41
|
'old'
|
|
42
|
+
else
|
|
43
|
+
'stable'
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
|
|
47
|
+
def emit_old_semconv_deprecation_warning(option)
|
|
48
|
+
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.")
|
|
49
|
+
end
|
|
50
|
+
|
|
45
51
|
def require_dependencies_dup
|
|
46
52
|
require_relative 'middlewares/dup/tracer_middleware'
|
|
47
53
|
require_relative 'patches/dup/socket'
|
|
@@ -17,29 +17,26 @@ module OpenTelemetry
|
|
|
17
17
|
def request_call(datum)
|
|
18
18
|
return @stack.request_call(datum) if untraced?(datum)
|
|
19
19
|
|
|
20
|
-
span_data = HttpHelper.
|
|
20
|
+
span_data = HttpHelper.span_attrs_for_dup(datum[:method])
|
|
21
21
|
|
|
22
22
|
cleansed_url = OpenTelemetry::Common::Utilities.cleanse_url(::Excon::Utils.request_uri(datum))
|
|
23
23
|
attributes = {
|
|
24
24
|
OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host],
|
|
25
|
-
OpenTelemetry::SemanticConventions::Trace::HTTP_METHOD => span_data.normalized_method,
|
|
26
25
|
OpenTelemetry::SemanticConventions::Trace::HTTP_SCHEME => datum[:scheme],
|
|
27
26
|
OpenTelemetry::SemanticConventions::Trace::HTTP_TARGET => datum[:path],
|
|
28
27
|
OpenTelemetry::SemanticConventions::Trace::HTTP_URL => cleansed_url,
|
|
29
28
|
OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => datum[:hostname],
|
|
30
29
|
OpenTelemetry::SemanticConventions::Trace::NET_PEER_PORT => datum[:port],
|
|
31
|
-
'http.request.method' => span_data.normalized_method,
|
|
32
30
|
'url.scheme' => datum[:scheme],
|
|
33
31
|
'url.path' => datum[:path],
|
|
34
32
|
'url.full' => cleansed_url,
|
|
35
33
|
'server.address' => datum[:hostname],
|
|
36
34
|
'server.port' => datum[:port]
|
|
37
35
|
}
|
|
38
|
-
attributes['http.request.method_original'] = span_data.original_method if span_data.original_method
|
|
39
36
|
attributes['url.query'] = datum[:query] if datum[:query]
|
|
40
37
|
peer_service = Excon::Instrumentation.instance.config[:peer_service]
|
|
41
38
|
attributes[OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = peer_service if peer_service
|
|
42
|
-
attributes.merge!(
|
|
39
|
+
attributes.merge!(span_data.attributes)
|
|
43
40
|
span = tracer.start_span(span_data.span_name, attributes: attributes, kind: :client)
|
|
44
41
|
ctx = OpenTelemetry::Trace.context_with_span(span)
|
|
45
42
|
datum[:otel_span] = span
|
|
@@ -17,11 +17,10 @@ module OpenTelemetry
|
|
|
17
17
|
def request_call(datum)
|
|
18
18
|
return @stack.request_call(datum) if untraced?(datum)
|
|
19
19
|
|
|
20
|
-
span_data = HttpHelper.
|
|
20
|
+
span_data = HttpHelper.span_attrs_for_old(datum[:method])
|
|
21
21
|
|
|
22
22
|
attributes = {
|
|
23
23
|
OpenTelemetry::SemanticConventions::Trace::HTTP_HOST => datum[:host],
|
|
24
|
-
OpenTelemetry::SemanticConventions::Trace::HTTP_METHOD => span_data.normalized_method,
|
|
25
24
|
OpenTelemetry::SemanticConventions::Trace::HTTP_SCHEME => datum[:scheme],
|
|
26
25
|
OpenTelemetry::SemanticConventions::Trace::HTTP_TARGET => datum[:path],
|
|
27
26
|
OpenTelemetry::SemanticConventions::Trace::HTTP_URL => OpenTelemetry::Common::Utilities.cleanse_url(::Excon::Utils.request_uri(datum)),
|
|
@@ -30,7 +29,7 @@ module OpenTelemetry
|
|
|
30
29
|
}
|
|
31
30
|
peer_service = Excon::Instrumentation.instance.config[:peer_service]
|
|
32
31
|
attributes[OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = peer_service if peer_service
|
|
33
|
-
attributes.merge!(
|
|
32
|
+
attributes.merge!(span_data.attributes)
|
|
34
33
|
span = tracer.start_span(span_data.span_name, attributes: attributes, kind: :client)
|
|
35
34
|
ctx = OpenTelemetry::Trace.context_with_span(span)
|
|
36
35
|
datum[:otel_span] = span
|
|
@@ -17,21 +17,17 @@ module OpenTelemetry
|
|
|
17
17
|
def request_call(datum)
|
|
18
18
|
return @stack.request_call(datum) if untraced?(datum)
|
|
19
19
|
|
|
20
|
-
span_data = HttpHelper.
|
|
20
|
+
span_data = HttpHelper.span_attrs_for_stable(datum[:method])
|
|
21
21
|
|
|
22
|
-
attributes = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'server.address' => datum[:hostname],
|
|
28
|
-
'server.port' => datum[:port]
|
|
29
|
-
}
|
|
30
|
-
attributes['http.request.method_original'] = span_data.original_method if span_data.original_method
|
|
22
|
+
attributes = { 'url.scheme' => datum[:scheme],
|
|
23
|
+
'url.path' => datum[:path],
|
|
24
|
+
'url.full' => OpenTelemetry::Common::Utilities.cleanse_url(::Excon::Utils.request_uri(datum)),
|
|
25
|
+
'server.address' => datum[:hostname],
|
|
26
|
+
'server.port' => datum[:port] }
|
|
31
27
|
attributes['url.query'] = datum[:query] if datum[:query]
|
|
32
28
|
peer_service = Excon::Instrumentation.instance.config[:peer_service]
|
|
33
29
|
attributes[OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = peer_service if peer_service
|
|
34
|
-
attributes.merge!(
|
|
30
|
+
attributes.merge!(span_data.attributes)
|
|
35
31
|
span = tracer.start_span(span_data.span_name, attributes: attributes, kind: :client)
|
|
36
32
|
ctx = OpenTelemetry::Trace.context_with_span(span)
|
|
37
33
|
datum[:otel_span] = span
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opentelemetry-instrumentation-excon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.29.1
|
|
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
|
|
@@ -52,11 +51,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
|
52
51
|
licenses:
|
|
53
52
|
- Apache-2.0
|
|
54
53
|
metadata:
|
|
55
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.
|
|
56
|
-
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/
|
|
54
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.29.1/file/CHANGELOG.md
|
|
55
|
+
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-excon/v0.29.1/instrumentation/excon
|
|
57
56
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
|
58
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.
|
|
59
|
-
post_install_message:
|
|
57
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-excon/0.29.1
|
|
60
58
|
rdoc_options: []
|
|
61
59
|
require_paths:
|
|
62
60
|
- lib
|
|
@@ -64,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
64
62
|
requirements:
|
|
65
63
|
- - ">="
|
|
66
64
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '3.
|
|
65
|
+
version: '3.3'
|
|
68
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
67
|
requirements:
|
|
70
68
|
- - ">="
|
|
71
69
|
- !ruby/object:Gem::Version
|
|
72
70
|
version: '0'
|
|
73
71
|
requirements: []
|
|
74
|
-
rubygems_version:
|
|
75
|
-
signing_key:
|
|
72
|
+
rubygems_version: 4.0.6
|
|
76
73
|
specification_version: 4
|
|
77
74
|
summary: Excon instrumentation for the OpenTelemetry framework
|
|
78
75
|
test_files: []
|