opentelemetry-instrumentation-net_http 0.27.0 → 0.28.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: e00a6b4c4bbb252a2de6b684c92a1ee795ff093f90e4a78c92531952b12ec20b
4
+ data.tar.gz: 31143899e71925865b825d865b18bc5131494ffe708a4258fa4d10a71e33614b
5
5
  SHA512:
6
- metadata.gz: f28c788929d2d2b2330291598b1116586e0ae5f692592ccff42b212cc948c035bc65d639d72391e990881a5326987d74441efea816f64fc82fde1e1ca9ae5cba
7
- data.tar.gz: 96ec477a7341ac52207adfd0a14b8bc20ebd64445f84b7cbb295d10a9b61be0af1e93a8983792e18cc8112c9b933151b25bc52f500abe01c320406c0384a29f1
6
+ metadata.gz: 074a27e1cdb249da3207f2963d2b989abb92ac6a0d554a47a4dfba39623962ce7f4c5785377096a27957eff5354aae3cb1a1dfeed20d240a955677021c737f95
7
+ data.tar.gz: db493c52e928e60c519f4f0a09e566c5c45b1a5cac1bb5f60db2b04aca800200e5b6390c237030e53ee3483fb32724f624d8a8252bc219cfae117f489c93930f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-net_http
2
2
 
3
+ ### v0.28.0 / 2026-03-17
4
+
5
+ * BREAKING CHANGE: Default to stable HTTP semantic conventions (#2051)
6
+ * ADDED: Default to stable HTTP semantic conventions (#2051)
7
+
3
8
  ### v0.27.0 / 2026-01-13
4
9
 
5
10
  * ADDED: HTTP Client Semconv v1.17 Span Naming
@@ -11,7 +16,6 @@
11
16
  ### v0.26.0 / 2025-10-22
12
17
 
13
18
  * BREAKING CHANGE: Min Ruby Version 3.2
14
-
15
19
  * ADDED: Min Ruby Version 3.2
16
20
 
17
21
  ### v0.25.1 / 2025-09-30
@@ -33,7 +37,6 @@
33
37
  ### v0.23.0 / 2025-01-16
34
38
 
35
39
  * BREAKING CHANGE: Set minimum supported version to Ruby 3.1
36
-
37
40
  * ADDED: Set minimum supported version to Ruby 3.1
38
41
 
39
42
  ### v0.22.8 / 2024-11-26
@@ -71,7 +74,6 @@
71
74
  ### v0.22.0 / 2023-04-17
72
75
 
73
76
  * BREAKING CHANGE: Drop support for EoL Ruby 2.7
74
-
75
77
  * ADDED: Drop support for EoL Ruby 2.7
76
78
  * FIXED: Drop Rails dependency for ActiveSupport Instrumentation
77
79
 
@@ -115,7 +117,6 @@
115
117
  ### v0.19.0 / 2021-06-23
116
118
 
117
119
  * BREAKING CHANGE: Total order constraint on span.status=
118
-
119
120
  * FIXED: Total order constraint on span.status=
120
121
 
121
122
  ### v0.18.0 / 2021-05-21
@@ -138,7 +139,6 @@
138
139
  ### v0.14.0 / 2021-02-03
139
140
 
140
141
  * BREAKING CHANGE: Replace getter and setter callables and remove rack specific propagators
141
-
142
142
  * ADDED: Replace getter and setter callables and remove rack specific propagators
143
143
 
144
144
  ### v0.13.0 / 2021-01-29
@@ -164,7 +164,6 @@
164
164
  ### v0.8.0 / 2020-10-27
165
165
 
166
166
  * BREAKING CHANGE: Remove 'canonical' from status codes
167
-
168
167
  * FIXED: Remove 'canonical' from status codes
169
168
 
170
169
  ### v0.7.0 / 2020-10-07
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.28.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.28.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
50
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-net_http/0.28.0/file/CHANGELOG.md
52
51
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/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.28.0
56
54
  rdoc_options: []
57
55
  require_paths:
58
56
  - lib
@@ -67,8 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
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.3
72
69
  specification_version: 4
73
70
  summary: Net::HTTP instrumentation for the OpenTelemetry framework
74
71
  test_files: []