opentelemetry-instrumentation-http_client 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: 97fed59fe7e430410a9353509988107cc0504e292ddfe4c33c92725ce389c612
4
- data.tar.gz: 44d7e50ff1ccd8100628e9885c1d2a044407f6e8c2f6f267ae9da2d765e7e28a
3
+ metadata.gz: a94b8067f84bca1dd487affdceb4cda269bc8af1c965ef7e76a951d1c4c04bac
4
+ data.tar.gz: 500a80d8f273638f42ac6b7ef6ecf6899a701fdb97b449c84012520949f6d41b
5
5
  SHA512:
6
- metadata.gz: 8dfca712f29151b379321cc97a7e9cfd247a6e703306ef8acfdd0d467703e9374c46733a24c7e28246bb1f7e9f21490cb7856f8cf2dbda0f4a803419685defa9
7
- data.tar.gz: cd4feb2873c2be4d263567efb437ec42871df5b053980ee88b4544c9e909833dee64aaa16e44374080bfd8d1a7eb5dca9799aa7a1bd3bc44c354b5731a3a827d
6
+ metadata.gz: 01c2ebc9d8c8110cfb4c0ddb4b2d64a0c28aeb492da75ee3ee39dffbb8ed2b7bbc44e9996b14a680a7592c5d38f97ca4f57aeaef50241d3d0fc1c980dd134e26
7
+ data.tar.gz: 11655cdc285e2a617339ff52752232eeba6cd844100ae4ed87f47a2155d0eddffdce51f547759f515b3f5f0ba531d8cebff9d286565d0358992aba4344938746
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-http_client
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
@@ -29,7 +33,6 @@
29
33
  ### v0.23.0 / 2025-01-16
30
34
 
31
35
  * BREAKING CHANGE: Set minimum supported version to Ruby 3.1
32
-
33
36
  * ADDED: Set minimum supported version to Ruby 3.1
34
37
 
35
38
  ### v0.22.8 / 2024-11-26
@@ -67,7 +70,6 @@
67
70
  ### v0.22.0 / 2023-04-17
68
71
 
69
72
  * BREAKING CHANGE: Drop support for EoL Ruby 2.7
70
-
71
73
  * ADDED: Drop support for EoL Ruby 2.7
72
74
 
73
75
  ### v0.21.0 / 2023-01-14
@@ -104,7 +106,6 @@
104
106
  ### v0.19.0 / 2021-06-23
105
107
 
106
108
  * BREAKING CHANGE: Total order constraint on span.status=
107
-
108
109
  * FIXED: Total order constraint on span.status=
109
110
 
110
111
  ### v0.18.0 / 2021-05-21
data/README.md CHANGED
@@ -55,16 +55,12 @@ The `opentelemetry-instrumentation-http_client` gem is distributed under the Apa
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 HttpClient 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, HttpClient instrumentation code comes in three patch versions: `dup`, `old`, and `stable`. These versions are identical except for the attributes they send. Any changes to HttpClient 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/).
@@ -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, :attributes, keyword_init: true)
14
+ SpanCreationAttributes = Struct.new(:span_name, :attributes)
15
15
 
16
16
  # Pre-computed mapping to avoid string allocations during normalization
17
17
  METHOD_CACHE = {
@@ -46,8 +46,8 @@ module OpenTelemetry
46
46
 
47
47
  private_constant :METHOD_CACHE
48
48
 
49
- OLD_SPAN_NAMES_BY_METHOD = METHOD_CACHE.values.uniq.each_with_object({}) do |method, hash|
50
- hash[method] = "HTTP #{method}"
49
+ OLD_SPAN_NAMES_BY_METHOD = METHOD_CACHE.values.uniq.to_h do |method|
50
+ [method, "HTTP #{method}"]
51
51
  end.freeze
52
52
 
53
53
  private_constant :OLD_SPAN_NAMES_BY_METHOD
@@ -28,14 +28,20 @@ module OpenTelemetry
28
28
  values = stability_opt_in.split(',').map(&:strip)
29
29
 
30
30
  if values.include?('http/dup')
31
+ emit_old_semconv_deprecation_warning('http/dup')
31
32
  'dup'
32
- elsif values.include?('http')
33
- 'stable'
34
- else
33
+ elsif values.include?('old')
34
+ emit_old_semconv_deprecation_warning('old')
35
35
  'old'
36
+ else
37
+ 'stable'
36
38
  end
37
39
  end
38
40
 
41
+ def emit_old_semconv_deprecation_warning(option)
42
+ 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.")
43
+ end
44
+
39
45
  def patch_dup
40
46
  ::HTTPClient.prepend(Patches::Dup::Client)
41
47
  ::HTTPClient::Session.prepend(Patches::Dup::Session)
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module HttpClient
10
- VERSION = '0.27.0'
10
+ VERSION = '0.28.0'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-http_client
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
@@ -51,11 +50,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
51
50
  licenses:
52
51
  - Apache-2.0
53
52
  metadata:
54
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-http_client/0.27.0/file/CHANGELOG.md
53
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-http_client/0.28.0/file/CHANGELOG.md
55
54
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/http_client
56
55
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
57
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-http_client/0.27.0
58
- post_install_message:
56
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-http_client/0.28.0
59
57
  rdoc_options: []
60
58
  require_paths:
61
59
  - lib
@@ -70,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
68
  - !ruby/object:Gem::Version
71
69
  version: '0'
72
70
  requirements: []
73
- rubygems_version: 3.4.19
74
- signing_key:
71
+ rubygems_version: 4.0.3
75
72
  specification_version: 4
76
73
  summary: HttpClient instrumentation for the OpenTelemetry framework
77
74
  test_files: []