opentelemetry-common 0.20.1 → 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: 8358d710c1b2a2285c8f8dce8094ea86b0fa7d8ca5cea361e04e91f8defb45d5
4
- data.tar.gz: 1cad299a9e7e9df8a78f8630559956663a1a03111ec735529c8d566069f3fb2a
3
+ metadata.gz: e7eb64734094d294359454868323d59319f1f659b6bbaba38a2d41fd80fae5d5
4
+ data.tar.gz: 1d5e0ff8282c8fce4d7052a522a7a96c2d03f0082ba5a3bdf3b8ad7875329560
5
5
  SHA512:
6
- metadata.gz: e70a9f01f67b507ca0ca9b35ed71899e00d5e6db03d64dc0ad4f49b58d5657b322aae89c127d32e3424114dcaf442098be981373924494c6167e5af262d38a3b
7
- data.tar.gz: c1e6bd8ac2b7cd2525131d2472783e8177aa3a5d3e77677a99a59727c2317027a06c285ef8b11a62e64ce7316e71a85ce0c0c116d0d8e85b42d5c53fe6c87c05
6
+ metadata.gz: b71c04529036aea6f16376c3b8e3718c2a6794ef964306412ffa349f0dafece57c18c494577e4852ec383b0260c07c966c2bc574dcdd6b2b9505e6a60eb823ca
7
+ data.tar.gz: ded4a0fcaa3287910d5fd468bf9273fd163bcce98ce1e7cb85c1c76cf6089668e6ed42e6c0ddac53137e061572199b573dd362163bf6fb24af57a9c1868dfb42
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
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
+
3
7
  ### v0.20.1 / 2024-02-06
4
8
 
5
9
  * FIXED: Patch the issue for frozen string on ruby < 3.0 with string interpolation
@@ -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.1'
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.1
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: 2024-02-06 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.1/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.1
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: