opentelemetry-instrumentation-net_http 0.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af57eff25e83e807b9fce58534f7354a8da730eeb796e37304e4fcfff10aacf8
4
- data.tar.gz: e05dab69206fd8a7eadee713bbc057c423b3908f848abf336d52ca974aab119b
3
+ metadata.gz: 53bd74e04f88cdbc957e2bea8c28f6164f0ebe78814d56cbe222b00757a8cfe6
4
+ data.tar.gz: c854319903b2d3e600daf1b151af069c4acfd4b62034ec41d639c6e811118497
5
5
  SHA512:
6
- metadata.gz: f28c788929d2d2b2330291598b1116586e0ae5f692592ccff42b212cc948c035bc65d639d72391e990881a5326987d74441efea816f64fc82fde1e1ca9ae5cba
7
- data.tar.gz: 96ec477a7341ac52207adfd0a14b8bc20ebd64445f84b7cbb295d10a9b61be0af1e93a8983792e18cc8112c9b933151b25bc52f500abe01c320406c0384a29f1
6
+ metadata.gz: 567957c73eda58ee4e560ede96646b03f4570392109e1e826246cfb6d739c8e80a3cb44da2a5335372a4bf065c917ba35aef3ccdb729650bba332dd8399e15ca
7
+ data.tar.gz: edfc740a298eff286668130b1c1e804049c602e61dc25f8024a91e7661899e1fbd5bc54cd077665d24cddbb0f4883751ca41ffda4d6a202c2c04c27b77618471
data/CHANGELOG.md CHANGED
@@ -1,177 +1,182 @@
1
1
  # Release History: opentelemetry-instrumentation-net_http
2
2
 
3
- ### v0.27.0 / 2026-01-13
3
+ ## v0.29.0 / 2026-04-14
4
4
 
5
- * ADDED: HTTP Client Semconv v1.17 Span Naming
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
- ### v0.26.1 / 2025-11-25
9
+ ## v0.28.0 / 2026-03-17
8
10
 
9
- * FIXED: Update support for unknown HTTP methods to match semantic conventions
11
+ - BREAKING CHANGE: Default to stable HTTP semantic conventions (#2051)
12
+ - ADDED: Default to stable HTTP semantic conventions (#2051)
10
13
 
11
- ### v0.26.0 / 2025-10-22
14
+ ## v0.27.0 / 2026-01-13
12
15
 
13
- * BREAKING CHANGE: Min Ruby Version 3.2
16
+ - ADDED: HTTP Client Semconv v1.17 Span Naming
14
17
 
15
- * ADDED: Min Ruby Version 3.2
18
+ ## v0.26.1 / 2025-11-25
16
19
 
17
- ### v0.25.1 / 2025-09-30
20
+ - FIXED: Update support for unknown HTTP methods to match semantic conventions
18
21
 
19
- * FIXED: Min OTel Ruby API 1.7
22
+ ## v0.26.0 / 2025-10-22
20
23
 
21
- ### v0.25.0 / 2025-09-30
24
+ - BREAKING CHANGE: Min Ruby Version 3.2
25
+ - ADDED: Min Ruby Version 3.2
22
26
 
23
- * ADDED: Bump minimum API Version to 1.7
27
+ ## v0.25.1 / 2025-09-30
24
28
 
25
- ### v0.24.0 / 2025-08-26
29
+ - FIXED: Min OTel Ruby API 1.7
26
30
 
27
- * ADDED: Add `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable compatibility [#1572](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/1572)
31
+ ## v0.25.0 / 2025-09-30
28
32
 
29
- ### v0.23.1 / 2025-08-13
33
+ - ADDED: Bump minimum API Version to 1.7
30
34
 
31
- * FIXED: net_http and aws_sdk ci fix
35
+ ## v0.24.0 / 2025-08-26
32
36
 
33
- ### v0.23.0 / 2025-01-16
37
+ - ADDED: Add `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable compatibility [#1572](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/1572)
34
38
 
35
- * BREAKING CHANGE: Set minimum supported version to Ruby 3.1
39
+ ## v0.23.1 / 2025-08-13
36
40
 
37
- * ADDED: Set minimum supported version to Ruby 3.1
41
+ - FIXED: net_http and aws_sdk ci fix
38
42
 
39
- ### v0.22.8 / 2024-11-26
43
+ ## v0.23.0 / 2025-01-16
40
44
 
41
- * CHANGED: Performance Freeze all range objects #1222
45
+ - BREAKING CHANGE: Set minimum supported version to Ruby 3.1
46
+ - ADDED: Set minimum supported version to Ruby 3.1
42
47
 
43
- ### v0.22.7 / 2024-07-23
48
+ ## v0.22.8 / 2024-11-26
44
49
 
45
- * DOCS: Add cspell to CI
50
+ - CHANGED: Performance Freeze all range objects #1222
46
51
 
47
- ### v0.22.6 / 2024-06-18
52
+ ## v0.22.7 / 2024-07-23
48
53
 
49
- * FIXED: Relax otel common gem constraints
54
+ - DOCS: Add cspell to CI
50
55
 
51
- ### v0.22.5 / 2024-05-09
56
+ ## v0.22.6 / 2024-06-18
52
57
 
53
- * FIXED: Untrace entire request
58
+ - FIXED: Relax otel common gem constraints
54
59
 
55
- ### v0.22.4 / 2023-11-23
60
+ ## v0.22.5 / 2024-05-09
56
61
 
57
- * CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727)
62
+ - FIXED: Untrace entire request
58
63
 
59
- ### v0.22.3 / 2023-11-22
64
+ ## v0.22.4 / 2023-11-23
60
65
 
61
- * FIXED: Update `Net::HTTP` instrumentation to no-op on untraced contexts
66
+ - CHANGED: Applied Rubocop Performance Recommendations [#727](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/727)
62
67
 
63
- ### v0.22.2 / 2023-07-21
68
+ ## v0.22.3 / 2023-11-22
64
69
 
65
- * ADDED: Update `opentelemetry-common` from [0.19.3 to 0.20.0](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/537)
70
+ - FIXED: Update `Net::HTTP` instrumentation to no-op on untraced contexts
66
71
 
67
- ### v0.22.1 / 2023-06-05
72
+ ## v0.22.2 / 2023-07-21
68
73
 
69
- * FIXED: Base config options
74
+ - ADDED: Update `opentelemetry-common` from [0.19.3 to 0.20.0](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/537)
70
75
 
71
- ### v0.22.0 / 2023-04-17
76
+ ## v0.22.1 / 2023-06-05
72
77
 
73
- * BREAKING CHANGE: Drop support for EoL Ruby 2.7
78
+ - FIXED: Base config options
74
79
 
75
- * ADDED: Drop support for EoL Ruby 2.7
76
- * FIXED: Drop Rails dependency for ActiveSupport Instrumentation
80
+ ## v0.22.0 / 2023-04-17
77
81
 
78
- ### v0.21.1 / 2023-01-14
82
+ - BREAKING CHANGE: Drop support for EoL Ruby 2.7
83
+ - ADDED: Drop support for EoL Ruby 2.7
84
+ - FIXED: Drop Rails dependency for ActiveSupport Instrumentation
79
85
 
80
- * FIXED: Add untraced check to the Net::HTTP connect instrumentation
81
- * DOCS: Fix gem homepage
82
- * DOCS: More gem documentation fixes
86
+ ## v0.21.1 / 2023-01-14
83
87
 
84
- ### v0.21.0 / 2022-10-04
88
+ - FIXED: Add untraced check to the Net::HTTP connect instrumentation
89
+ - DOCS: Fix gem homepage
90
+ - DOCS: More gem documentation fixes
85
91
 
86
- * ADDED: Add Net::HTTP :untraced_hosts option
87
- * FIXED: Rename HTTP CONNECT for low level connection spans
92
+ ## v0.21.0 / 2022-10-04
88
93
 
89
- ### v0.20.0 / 2022-06-09
94
+ - ADDED: Add Net::HTTP :untraced_hosts option
95
+ - FIXED: Rename HTTP CONNECT for low level connection spans
90
96
 
91
- * Upgrading Base dependency version
92
- * FIXED: Broken test file requirements
97
+ ## v0.20.0 / 2022-06-09
93
98
 
94
- ### v0.19.5 / 2022-05-05
99
+ - Upgrading Base dependency version
100
+ - FIXED: Broken test file requirements
95
101
 
96
- * (No significant changes)
102
+ ## v0.19.5 / 2022-05-05
97
103
 
98
- ### v0.19.4 / 2022-02-02
104
+ - (No significant changes)
99
105
 
100
- * FIXED: Client Context attrs overwrite in net::http
101
- * FIXED: Excessive hash creation on context attr merging
106
+ ## v0.19.4 / 2022-02-02
102
107
 
103
- ### v0.19.3 / 2021-12-01
108
+ - FIXED: Client Context attrs overwrite in net::http
109
+ - FIXED: Excessive hash creation on context attr merging
104
110
 
105
- * FIXED: Change net attribute names to match the semantic conventions spec for http
111
+ ## v0.19.3 / 2021-12-01
106
112
 
107
- ### v0.19.2 / 2021-09-29
113
+ - FIXED: Change net attribute names to match the semantic conventions spec for http
108
114
 
109
- * (No significant changes)
115
+ ## v0.19.2 / 2021-09-29
110
116
 
111
- ### v0.19.1 / 2021-08-12
117
+ - (No significant changes)
112
118
 
113
- * DOCS: Update docs to rely more on environment variable configuration
119
+ ## v0.19.1 / 2021-08-12
114
120
 
115
- ### v0.19.0 / 2021-06-23
121
+ - DOCS: Update docs to rely more on environment variable configuration
116
122
 
117
- * BREAKING CHANGE: Total order constraint on span.status=
123
+ ## v0.19.0 / 2021-06-23
118
124
 
119
- * FIXED: Total order constraint on span.status=
125
+ - BREAKING CHANGE: Total order constraint on span.status=
126
+ - FIXED: Total order constraint on span.status=
120
127
 
121
- ### v0.18.0 / 2021-05-21
128
+ ## v0.18.0 / 2021-05-21
122
129
 
123
- * ADDED: Updated API dependency for 1.0.0.rc1
130
+ - ADDED: Updated API dependency for 1.0.0.rc1
124
131
 
125
- ### v0.17.0 / 2021-04-22
132
+ ## v0.17.0 / 2021-04-22
126
133
 
127
- * FIXED: Refactor propagators to add #fields
134
+ - FIXED: Refactor propagators to add #fields
128
135
 
129
- ### v0.16.0 / 2021-03-17
136
+ ## v0.16.0 / 2021-03-17
130
137
 
131
- * FIXED: Example scripts now reference local common lib
132
- * DOCS: Replace Gitter with GitHub Discussions
138
+ - FIXED: Example scripts now reference local common lib
139
+ - DOCS: Replace Gitter with GitHub Discussions
133
140
 
134
- ### v0.15.0 / 2021-02-18
141
+ ## v0.15.0 / 2021-02-18
135
142
 
136
- * ADDED: Add Net::HTTP#connect tracing
143
+ - ADDED: Add Net::HTTP#connect tracing
137
144
 
138
- ### v0.14.0 / 2021-02-03
145
+ ## v0.14.0 / 2021-02-03
139
146
 
140
- * BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
147
+ - BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
148
+ - ADDED: Replace getter and setter callables and remove rack specific propagators
141
149
 
142
- * ADDED: Replace getter and setter callables and remove rack specific propagators
150
+ ## v0.13.0 / 2021-01-29
143
151
 
144
- ### v0.13.0 / 2021-01-29
152
+ - (No significant changes)
145
153
 
146
- * (No significant changes)
154
+ ## v0.12.0 / 2020-12-24
147
155
 
148
- ### v0.12.0 / 2020-12-24
156
+ - (No significant changes)
149
157
 
150
- * (No significant changes)
158
+ ## v0.11.0 / 2020-12-11
151
159
 
152
- ### v0.11.0 / 2020-12-11
160
+ - FIXED: Copyright comments to not reference year
153
161
 
154
- * FIXED: Copyright comments to not reference year
162
+ ## v0.10.0 / 2020-12-03
155
163
 
156
- ### v0.10.0 / 2020-12-03
164
+ - (No significant changes)
157
165
 
158
- * (No significant changes)
166
+ ## v0.9.0 / 2020-11-27
159
167
 
160
- ### v0.9.0 / 2020-11-27
168
+ - ADDED: Add common helpers
161
169
 
162
- * ADDED: Add common helpers
170
+ ## v0.8.0 / 2020-10-27
163
171
 
164
- ### v0.8.0 / 2020-10-27
172
+ - BREAKING CHANGE: Remove 'canonical' from status codes
173
+ - FIXED: Remove 'canonical' from status codes
165
174
 
166
- * BREAKING CHANGE: Remove 'canonical' from status codes
175
+ ## v0.7.0 / 2020-10-07
167
176
 
168
- * FIXED: Remove 'canonical' from status codes
177
+ - DOCS: Added documentation for net_http gem in instrumentation
178
+ - DOCS: Standardize top-level docs structure and readme
169
179
 
170
- ### v0.7.0 / 2020-10-07
180
+ ## v0.6.0 / 2020-09-10
171
181
 
172
- * DOCS: Added documentation for net_http gem in instrumentation
173
- * DOCS: Standardize top-level docs structure and readme
174
-
175
- ### v0.6.0 / 2020-09-10
176
-
177
- * (No significant changes)
182
+ - (No significant changes)
data/README.md CHANGED
@@ -55,16 +55,12 @@ Apache 2.0 license. See [LICENSE][license-github] for more information.
55
55
 
56
56
  ## HTTP semantic convention stability
57
57
 
58
- In the OpenTelemetry ecosystem, HTTP semantic conventions have now reached a stable state. However, the initial Net::HTTP instrumentation was introduced before this stability was achieved, which resulted in HTTP attributes being based on an older version of the semantic conventions.
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 and ceases emitting the old conventions previously emitted by the instrumentation.
65
- - `http/dup` - Emits both the old and stable HTTP and networking conventions, enabling a phased rollout of the stable semantic conventions.
66
- - Default behavior (in the absence of either value) is to continue emitting the old HTTP and networking conventions the instrumentation previously emitted.
67
-
68
- During the transition from old to stable conventions, Net::HTTP instrumentation code comes in three patch versions: `dup`, `old`, and `stable`. These versions are identical except for the attributes they send. Any changes to Net::HTTP 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
66
  For additional information on migration, please refer to our [documentation](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/).
@@ -12,7 +12,7 @@ module OpenTelemetry
12
12
  # @api private
13
13
  module HttpHelper
14
14
  # Lightweight struct to hold span creation attributes
15
- SpanCreationAttributes = Struct.new(:span_name, :attributes, keyword_init: true)
15
+ SpanCreationAttributes = Struct.new(:span_name, :attributes)
16
16
 
17
17
  # Pre-computed mapping to avoid string allocations during normalization
18
18
  METHOD_CACHE = {
@@ -47,8 +47,8 @@ module OpenTelemetry
47
47
 
48
48
  private_constant :METHOD_CACHE
49
49
 
50
- OLD_SPAN_NAMES_BY_METHOD = METHOD_CACHE.values.uniq.each_with_object({}) do |method, hash|
51
- hash[method] = "HTTP #{method}"
50
+ OLD_SPAN_NAMES_BY_METHOD = METHOD_CACHE.values.uniq.to_h do |method|
51
+ [method, "HTTP #{method}"]
52
52
  end.freeze
53
53
 
54
54
  private_constant :OLD_SPAN_NAMES_BY_METHOD
@@ -36,14 +36,20 @@ module OpenTelemetry
36
36
  values = stability_opt_in.split(',').map(&:strip)
37
37
 
38
38
  if values.include?('http/dup')
39
+ emit_old_semconv_deprecation_warning('http/dup')
39
40
  'dup'
40
- elsif values.include?('http')
41
- 'stable'
42
- else
41
+ elsif values.include?('old')
42
+ emit_old_semconv_deprecation_warning('old')
43
43
  'old'
44
+ else
45
+ 'stable'
44
46
  end
45
47
  end
46
48
 
49
+ def emit_old_semconv_deprecation_warning(option)
50
+ 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.")
51
+ end
52
+
47
53
  def require_dependencies_dup
48
54
  require_relative 'patches/dup/instrumentation'
49
55
  end
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Net
10
10
  module HTTP
11
- VERSION = '0.27.0'
11
+ VERSION = '0.29.0'
12
12
  end
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-net_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.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: 2026-01-13 00:00:00.000000000 Z
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
@@ -48,11 +47,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
48
47
  licenses:
49
48
  - Apache-2.0
50
49
  metadata:
51
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-net_http/0.27.0/file/CHANGELOG.md
52
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/net_http
50
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-net_http/0.29.0/file/CHANGELOG.md
51
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-net_http/v0.29.0/instrumentation/net_http
53
52
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
54
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-net_http/0.27.0
55
- post_install_message:
53
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-net_http/0.29.0
56
54
  rdoc_options: []
57
55
  require_paths:
58
56
  - lib
@@ -60,15 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
58
  requirements:
61
59
  - - ">="
62
60
  - !ruby/object:Gem::Version
63
- version: '3.2'
61
+ version: '3.3'
64
62
  required_rubygems_version: !ruby/object:Gem::Requirement
65
63
  requirements:
66
64
  - - ">="
67
65
  - !ruby/object:Gem::Version
68
66
  version: '0'
69
67
  requirements: []
70
- rubygems_version: 3.4.19
71
- signing_key:
68
+ rubygems_version: 4.0.6
72
69
  specification_version: 4
73
70
  summary: Net::HTTP instrumentation for the OpenTelemetry framework
74
71
  test_files: []