opentelemetry-common 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c566ff76c57ae0c1b8d36a20b6a8fc3dfa8fa46ef2a9063ed253886b68a11bb
4
- data.tar.gz: 7d3b27282ee84fde573db2d6b77896cc3e52ae65fe697ab557b2af2b49ab2a4d
3
+ metadata.gz: e7eb64734094d294359454868323d59319f1f659b6bbaba38a2d41fd80fae5d5
4
+ data.tar.gz: 1d5e0ff8282c8fce4d7052a522a7a96c2d03f0082ba5a3bdf3b8ad7875329560
5
5
  SHA512:
6
- metadata.gz: b1a3812dc8d2c761ca0aa606b369c86a435489a83f9507219449e440ec06fb34f1a4ab096d07a473fc58fa990d9f3a24f99eeaf39afa805691bf01e6e9668b6c
7
- data.tar.gz: 0ecee0bea1cc5a6d0ad8aabb056207610ddef7093f620bdbabcd4434184605369b9b232e2c1c4b84db28bfcc501bbae8cdac1d776456807f6d4714a0058a9154
6
+ metadata.gz: b71c04529036aea6f16376c3b8e3718c2a6794ef964306412ffa349f0dafece57c18c494577e4852ec383b0260c07c966c2bc574dcdd6b2b9505e6a60eb823ca
7
+ data.tar.gz: ded4a0fcaa3287910d5fd468bf9273fd163bcce98ce1e7cb85c1c76cf6089668e6ed42e6c0ddac53137e061572199b573dd362163bf6fb24af57a9c1868dfb42
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History: opentelemetry-common
2
2
 
3
+ ### v0.21.0 / 2024-05-08
4
+
5
+ * ADDED: Untraced method updated to support both block and non block structured calls
6
+
7
+ ### v0.20.1 / 2024-02-06
8
+
9
+ * FIXED: Patch the issue for frozen string on ruby < 3.0 with string interpolation
10
+
3
11
  ### v0.20.0 / 2023-06-08
4
12
 
5
13
  * BREAKING CHANGE: Remove support for EoL Ruby 2.7
@@ -29,7 +29,8 @@ module OpenTelemetry
29
29
  private
30
30
 
31
31
  def to_rack_key(key)
32
- ret = "HTTP_#{key}"
32
+ # Use + for mutable string interpolation in pre-Ruby 3.0.
33
+ ret = +"HTTP_#{key}"
33
34
  ret.tr!('-', '_')
34
35
  ret.upcase!
35
36
  ret
@@ -4,6 +4,8 @@
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
+ require 'uri'
8
+
7
9
  module OpenTelemetry
8
10
  module Common
9
11
  # Utilities contains common helpers.
@@ -86,10 +88,17 @@ module OpenTelemetry
86
88
  end
87
89
  end
88
90
 
89
- # Disables tracing within the provided block.
90
- def untraced
91
- Context.with_value(UNTRACED_KEY, true) do |ctx, _|
92
- yield ctx
91
+ # Disables tracing within the provided block
92
+ # If no block is provided instead returns an
93
+ # untraced ctx.
94
+ #
95
+ # @param [optional Context] context Accepts an explicit context, defaults to current
96
+ def untraced(context = Context.current)
97
+ context = context.set_value(UNTRACED_KEY, true)
98
+ if block_given?
99
+ Context.with_current(context) { |ctx| yield ctx }
100
+ else
101
+ context
93
102
  end
94
103
  end
95
104
 
@@ -6,6 +6,6 @@
6
6
 
7
7
  module OpenTelemetry
8
8
  module Common
9
- VERSION = '0.20.0'
9
+ VERSION = '0.21.0'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-13 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -160,10 +160,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
160
160
  licenses:
161
161
  - Apache-2.0
162
162
  metadata:
163
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.20.0/file.CHANGELOG.html
163
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.21.0/file.CHANGELOG.html
164
164
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/common
165
165
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
166
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.20.0
166
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.21.0
167
167
  post_install_message:
168
168
  rdoc_options: []
169
169
  require_paths: