opentelemetry-common 0.19.3 → 0.19.5

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: 57498f1cb42a7b108f91514b8cf743ee38ae3f18e7708ac920897e0c9b702174
4
- data.tar.gz: 3a0cc5778fc7003c91510454aa9941bc893d09d35a21757d80fad589a84b0403
3
+ metadata.gz: 58a2d895adece2c6a96be7355362c2bc630da33eced02fad36f25ccb6f9dd543
4
+ data.tar.gz: 1db1cbe0cd4f566e7f96e475f25de913d639780a44bce94b3e40875fd813cc92
5
5
  SHA512:
6
- metadata.gz: 77981f329e7fc9b8d128d8057fed02f1cce67282899f14a3cdae0c159c1e5d1658fcf3a5f2d6a89852905dcb3652bf60d416943f5fe9643ccbeea69e19cec1c6
7
- data.tar.gz: edfd859d561c5ac30ac1f603cec5ab2b1e8d171c4a0f9311b5e30ca1204484a4d1fe0dff5ba1d4e851a0340f6a6665e5bfdf805fdcb1fe80f41774f827b2fa03
6
+ metadata.gz: 836efd569b9efae0067951776782942b1d378232d80f29c7c8ddb7319f1d786b06b3f08cf741eb821adc0463bb09269249d656d9db5c63be1956bb7a2d850791
7
+ data.tar.gz: b42f204f66bb84eb28302ecff3135c0dea6c462e78e6e7b5a6e7244440a8aa6818d274b933995b4fba397ef6db4b52e706198dbadf13507a5df431e0d4aa8f01
data/CHANGELOG.md CHANGED
@@ -1,4 +1,13 @@
1
+ # Release History: opentelemetry-common
1
2
 
3
+ ### v0.19.5 / 2022-05-10
4
+
5
+ * FIXED: Common changelog
6
+
7
+ ### v0.19.4 / 2022-05-08
8
+
9
+ * FIXED: Check that a variable is a string before truncating
10
+ * FIXED: Attribute length limit. only truncate strings and strings in arrays
2
11
 
3
12
  ### v0.19.3 / 2021-12-01
4
13
 
@@ -11,7 +11,7 @@ module OpenTelemetry
11
11
  module ClientContext
12
12
  extend self
13
13
 
14
- CURRENT_ATTRIBUTES_HASH = Context.create_key('current-attributes-hash')
14
+ CURRENT_ATTRIBUTES_HASH = Context.create_key('http-client-context-attributes-hash')
15
15
 
16
16
  private_constant :CURRENT_ATTRIBUTES_HASH
17
17
 
@@ -72,6 +72,17 @@ module OpenTelemetry
72
72
  string.size > size ? "#{string[0...size - 3]}..." : string
73
73
  end
74
74
 
75
+ def truncate_attribute_value(value, limit)
76
+ case value
77
+ when Array
78
+ value.map { |x| truncate_attribute_value(x, limit) }
79
+ when String
80
+ truncate(value, limit)
81
+ else
82
+ value
83
+ end
84
+ end
85
+
75
86
  def untraced
76
87
  OpenTelemetry::Trace.with_span(OpenTelemetry::Trace.non_recording_span(OpenTelemetry::Trace::SpanContext.new)) { yield }
77
88
  end
@@ -6,6 +6,6 @@
6
6
 
7
7
  module OpenTelemetry
8
8
  module Common
9
- VERSION = '0.19.3'
9
+ VERSION = '0.19.5'
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.19.3
4
+ version: 0.19.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-01 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -140,17 +140,16 @@ files:
140
140
  - lib/opentelemetry/common/propagation.rb
141
141
  - lib/opentelemetry/common/propagation/rack_env_getter.rb
142
142
  - lib/opentelemetry/common/propagation/symbol_key_getter.rb
143
- - lib/opentelemetry/common/test_helpers.rb
144
143
  - lib/opentelemetry/common/utilities.rb
145
144
  - lib/opentelemetry/common/version.rb
146
145
  homepage: https://github.com/open-telemetry/opentelemetry-ruby
147
146
  licenses:
148
147
  - Apache-2.0
149
148
  metadata:
150
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.3/file.CHANGELOG.html
149
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.5/file.CHANGELOG.html
151
150
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/common
152
151
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
153
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.3
152
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.19.5
154
153
  post_install_message:
155
154
  rdoc_options: []
156
155
  require_paths:
@@ -159,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
158
  requirements:
160
159
  - - ">="
161
160
  - !ruby/object:Gem::Version
162
- version: 2.5.0
161
+ version: 2.6.0
163
162
  required_rubygems_version: !ruby/object:Gem::Requirement
164
163
  requirements:
165
164
  - - ">="
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright The OpenTelemetry Authors
4
- #
5
- # SPDX-License-Identifier: Apache-2.0
6
-
7
- def with_env(new_env)
8
- env_to_reset = ENV.select { |k, _| new_env.key?(k) }
9
- keys_to_delete = new_env.keys - ENV.keys
10
- new_env.each_pair { |k, v| ENV[k] = v }
11
- yield
12
- ensure
13
- env_to_reset.each_pair { |k, v| ENV[k] = v }
14
- keys_to_delete.each { |k| ENV.delete(k) }
15
- end
16
-
17
- def exportable_timestamp(time = Time.now)
18
- (time.to_r * 1_000_000_000).to_i
19
- end