opentelemetry-api 0.12.0 → 0.12.1

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: c7c58fd79dce24997ec350919d59c831940d6604acea611b2a0be72177f0b692
4
- data.tar.gz: a0c08af587e1002da839ff0f4d9860f528256fbb3dbba3b885c0494f06c71b95
3
+ metadata.gz: 58264937365e5c87460c86fc590654f4a9ace1bb56e9b65bb05200b922e06c5a
4
+ data.tar.gz: 286b0a063e4e2f2d767edd499e8bd695f216f38328bb3e78cc129dd5640b7472
5
5
  SHA512:
6
- metadata.gz: 3988fc0200883dadf62a8623d6c727d032c6648c2bc4e860cac0e3f7ae3e8bacc6a0c8a05638272cbf24d254cfaf3723bfdb2564e306bb99e029d1f88860d5d4
7
- data.tar.gz: 183d0203693f3585a153992582aee24e7df9ce3afc66ba536dd3dcfc7295ca00226b3cb02f468fa9ce17fce2dc6b5a54523c5cfba4b79c87d8f879255d6a34e1
6
+ metadata.gz: 8a70ee26d082a08281ed38c292fb2eb304a5e07fee516ecc241e68cd835b6d7b37f34d82bef67728a7d687c130030e72925ca9d747c4804b0e60fa6ac1fe07ad
7
+ data.tar.gz: 452e2a3cfab14130766427d4c1aeda4a936e5a827066f6b67247c40b8e92fddfd520d79aa03c20293df1e0d9e69994a29326d3c12408de7a3edab1743dc47453
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-api
2
2
 
3
+ ### v0.12.1 / 2021-01-13
4
+
5
+ * FIXED: Eliminate warning about Random::DEFAULT on Ruby 3.0
6
+
3
7
  ### v0.12.0 / 2020-12-24
4
8
 
5
9
  * ADDED: Structured error handling
@@ -13,7 +13,17 @@ module OpenTelemetry
13
13
 
14
14
  CURRENT_SPAN_KEY = Context.create_key('current-span')
15
15
 
16
- private_constant :CURRENT_SPAN_KEY
16
+ # Random number generator for generating IDs. This is an object that can
17
+ # respond to `#bytes` and uses the system PRNG. The current logic is
18
+ # compatible with Ruby 2.5 (which does not implement the `Random.bytes`
19
+ # class method) and with Ruby 3.0+ (which deprecates `Random::DEFAULT`).
20
+ # When we drop support for Ruby 2.5, this can simply be replaced with
21
+ # the class `Random`.
22
+ #
23
+ # @return [#bytes]
24
+ RANDOM = Random.respond_to?(:bytes) ? Random : Random::DEFAULT
25
+
26
+ private_constant :CURRENT_SPAN_KEY, :RANDOM
17
27
 
18
28
  # An invalid trace identifier, a 16-byte string with all zero bytes.
19
29
  INVALID_TRACE_ID = ("\0" * 16).b
@@ -27,7 +37,7 @@ module OpenTelemetry
27
37
  # @return [String] a valid trace ID.
28
38
  def generate_trace_id
29
39
  loop do
30
- id = Random::DEFAULT.bytes(16)
40
+ id = RANDOM.bytes(16)
31
41
  return id unless id == INVALID_TRACE_ID
32
42
  end
33
43
  end
@@ -38,7 +48,7 @@ module OpenTelemetry
38
48
  # @return [String] a valid span ID.
39
49
  def generate_span_id
40
50
  loop do
41
- id = Random::DEFAULT.bytes(8)
51
+ id = RANDOM.bytes(8)
42
52
  return id unless id == INVALID_SPAN_ID
43
53
  end
44
54
  end
@@ -6,5 +6,5 @@
6
6
 
7
7
  module OpenTelemetry
8
8
  ## Current OpenTelemetry version
9
- VERSION = '0.12.0'
9
+ VERSION = '0.12.1'
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-24 00:00:00.000000000 Z
11
+ date: 2021-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ipsa
@@ -196,10 +196,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
196
196
  licenses:
197
197
  - Apache-2.0
198
198
  metadata:
199
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v0.12.0/file.CHANGELOG.html
199
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v0.12.1/file.CHANGELOG.html
200
200
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/api
201
201
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
202
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v0.12.0
202
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v0.12.1
203
203
  post_install_message:
204
204
  rdoc_options: []
205
205
  require_paths: