opentelemetry-common 0.21.0 → 0.24.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: e7eb64734094d294359454868323d59319f1f659b6bbaba38a2d41fd80fae5d5
4
- data.tar.gz: 1d5e0ff8282c8fce4d7052a522a7a96c2d03f0082ba5a3bdf3b8ad7875329560
3
+ metadata.gz: 5118a52c058f77187033d53f36333266f9bdc8707b979d6fbb3ca164c9fd63fa
4
+ data.tar.gz: 6d459862f108702118fcb872f72801c5a9d6227403a27e9c2f6a688e958e9396
5
5
  SHA512:
6
- metadata.gz: b71c04529036aea6f16376c3b8e3718c2a6794ef964306412ffa349f0dafece57c18c494577e4852ec383b0260c07c966c2bc574dcdd6b2b9505e6a60eb823ca
7
- data.tar.gz: ded4a0fcaa3287910d5fd468bf9273fd163bcce98ce1e7cb85c1c76cf6089668e6ed42e6c0ddac53137e061572199b573dd362163bf6fb24af57a9c1868dfb42
6
+ metadata.gz: fd282efbab5f1e573acfd13e9e31fff91bdae83fa31d9f30f6f0e694b5952d596ef3f3e43b6fc926ffde5e4ccbf43ab5883b92e7ad2300321a300875dafe8611
7
+ data.tar.gz: f3acd67e2f05748f197971ae82d68319781bea394af6ffbb55ead19bb8e55000cfec584207ea11bda818ead4b8ef4a1879f7666ca0c88a4f4ad06e53cf79e92e
data/CHANGELOG.md CHANGED
@@ -1,94 +1,106 @@
1
1
  # Release History: opentelemetry-common
2
2
 
3
+ ### v0.24.0 / 2026-04-07
4
+
5
+ * ADDED: Min Ruby Version 3.3 (#2070)
6
+
7
+ ### v0.23.0 / 2025-10-14
8
+
9
+ * ADDED: Create method for returning timestamp in nanoseconds
10
+
11
+ ### v0.22.0 / 2025-02-25
12
+
13
+ - ADDED: Support 3.1 Min Version
14
+
3
15
  ### v0.21.0 / 2024-05-08
4
16
 
5
- * ADDED: Untraced method updated to support both block and non block structured calls
17
+ - ADDED: Untraced method updated to support both block and non block structured calls
6
18
 
7
19
  ### v0.20.1 / 2024-02-06
8
20
 
9
- * FIXED: Patch the issue for frozen string on ruby < 3.0 with string interpolation
21
+ - FIXED: Patch the issue for frozen string on ruby < 3.0 with string interpolation
10
22
 
11
23
  ### v0.20.0 / 2023-06-08
12
24
 
13
- * BREAKING CHANGE: Remove support for EoL Ruby 2.7
25
+ - BREAKING CHANGE: Remove support for EoL Ruby 2.7
14
26
 
15
- * ADDED: Remove support for EoL Ruby 2.7
27
+ - ADDED: Remove support for EoL Ruby 2.7
16
28
 
17
29
  ### v0.19.7 / 2023-05-30
18
30
 
19
- * FIXED: Untraced only works with parent-based sampler
31
+ - FIXED: Untraced only works with parent-based sampler
20
32
 
21
33
  ### v0.19.6 / 2022-05-18
22
34
 
23
- * (No significant changes)
35
+ - (No significant changes)
24
36
 
25
37
  ### v0.19.5 / 2022-05-10
26
38
 
27
- * FIXED: Common changelog
39
+ - FIXED: Common changelog
28
40
 
29
41
  ### v0.19.4 / 2022-05-08
30
42
 
31
- * FIXED: Check that a variable is a string before truncating
32
- * FIXED: Attribute length limit. only truncate strings and strings in arrays
43
+ - FIXED: Check that a variable is a string before truncating
44
+ - FIXED: Attribute length limit. only truncate strings and strings in arrays
33
45
 
34
46
  ### v0.19.3 / 2021-12-01
35
47
 
36
- * FIXED: Change net attribute names to match the semantic conventions spec for http
48
+ - FIXED: Change net attribute names to match the semantic conventions spec for http
37
49
 
38
50
  ### v0.19.2 / 2021-09-29
39
51
 
40
- * (No significant changes)
52
+ - (No significant changes)
41
53
 
42
54
  ### v0.19.1 / 2021-08-12
43
55
 
44
- * (No significant changes)
56
+ - (No significant changes)
45
57
 
46
58
  ### v0.19.0 / 2021-06-23
47
59
 
48
- * ADDED: Add Tracer.non_recording_span to API
60
+ - ADDED: Add Tracer.non_recording_span to API
49
61
 
50
62
  ### v0.18.0 / 2021-05-21
51
63
 
52
- * BREAKING CHANGE: Replace Time.now with Process.clock_gettime
64
+ - BREAKING CHANGE: Replace Time.now with Process.clock_gettime
53
65
 
54
- * FIXED: Replace Time.now with Process.clock_gettime
66
+ - FIXED: Replace Time.now with Process.clock_gettime
55
67
 
56
68
  ### v0.17.0 / 2021-04-22
57
69
 
58
- * ADDED: Add zipkin exporter
59
- * ADDED: Processors validate exporters on init.
70
+ - ADDED: Add zipkin exporter
71
+ - ADDED: Processors validate exporters on init.
60
72
 
61
73
  ### v0.16.0 / 2021-03-17
62
74
 
63
- * ADDED: Instrument lmdb gem
64
- * FIXED: Remove passwords from http.url
65
- * DOCS: Replace Gitter with GitHub Discussions
75
+ - ADDED: Instrument lmdb gem
76
+ - FIXED: Remove passwords from http.url
77
+ - DOCS: Replace Gitter with GitHub Discussions
66
78
 
67
79
  ### v0.15.0 / 2021-02-18
68
80
 
69
- * (No significant changes)
81
+ - (No significant changes)
70
82
 
71
83
  ### v0.14.0 / 2021-02-03
72
84
 
73
- * (No significant changes)
85
+ - (No significant changes)
74
86
 
75
87
  ### v0.13.0 / 2021-01-29
76
88
 
77
- * ADDED: Add untraced wrapper to common utils
89
+ - ADDED: Add untraced wrapper to common utils
78
90
 
79
91
  ### v0.12.0 / 2020-12-24
80
92
 
81
- * (No significant changes)
93
+ - (No significant changes)
82
94
 
83
95
  ### v0.11.0 / 2020-12-11
84
96
 
85
- * ADDED: Move utf8 encoding to common utils
86
- * FIXED: Copyright comments to not reference year
97
+ - ADDED: Move utf8 encoding to common utils
98
+ - FIXED: Copyright comments to not reference year
87
99
 
88
100
  ### v0.10.0 / 2020-12-03
89
101
 
90
- * FIXED: Common gem should depend on api gem
102
+ - FIXED: Common gem should depend on api gem
91
103
 
92
104
  ### v0.9.0 / 2020-11-27
93
105
 
94
- * Initial release.
106
+ - Initial release.
data/README.md CHANGED
@@ -16,7 +16,7 @@ The `opentelemetry-common` gem provides common helpers for semantic conventions,
16
16
 
17
17
  Install the gem using:
18
18
 
19
- ```
19
+ ```sh
20
20
  gem install opentelemetry-common
21
21
  ```
22
22
 
@@ -42,6 +42,14 @@ module OpenTelemetry
42
42
  Process.clock_gettime(Process::CLOCK_MONOTONIC)
43
43
  end
44
44
 
45
+ # Converts the provided timestamp to nanosecond integer
46
+ #
47
+ # @param timestamp [Time] the timestamp to convert, defaults to Time.now
48
+ # @return [Integer]
49
+ def time_in_nanoseconds(timestamp = Time.now)
50
+ (timestamp.to_r * 1_000_000_000).to_i
51
+ end
52
+
45
53
  # Encodes a string in utf8
46
54
  #
47
55
  # @param [String] string The string to be utf8 encoded
@@ -129,7 +137,7 @@ module OpenTelemetry
129
137
  # @param default The fallback value to return if the requested
130
138
  # env var(s) are not present
131
139
  #
132
- # @returns [String]
140
+ # @return [String]
133
141
  def config_opt(*env_vars, default: nil)
134
142
  ENV.values_at(*env_vars).compact.fetch(0, default)
135
143
  end
@@ -6,6 +6,6 @@
6
6
 
7
7
  module OpenTelemetry
8
8
  module Common
9
- VERSION = '0.21.0'
9
+ VERSION = '0.24.0'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-05-08 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-api
@@ -24,20 +23,6 @@ dependencies:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
25
  version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '1.17'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '1.17'
41
26
  - !ruby/object:Gem::Dependency
42
27
  name: minitest
43
28
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +57,28 @@ dependencies:
72
57
  requirements:
73
58
  - - "~>"
74
59
  - !ruby/object:Gem::Version
75
- version: '12.0'
60
+ version: '13.3'
76
61
  type: :development
77
62
  prerelease: false
78
63
  version_requirements: !ruby/object:Gem::Requirement
79
64
  requirements:
80
65
  - - "~>"
81
66
  - !ruby/object:Gem::Version
82
- version: '12.0'
67
+ version: '13.3'
83
68
  - !ruby/object:Gem::Dependency
84
69
  name: rubocop
85
70
  requirement: !ruby/object:Gem::Requirement
86
71
  requirements:
87
72
  - - "~>"
88
73
  - !ruby/object:Gem::Version
89
- version: '1.3'
74
+ version: '1.65'
90
75
  type: :development
91
76
  prerelease: false
92
77
  version_requirements: !ruby/object:Gem::Requirement
93
78
  requirements:
94
79
  - - "~>"
95
80
  - !ruby/object:Gem::Version
96
- version: '1.3'
81
+ version: '1.65'
97
82
  - !ruby/object:Gem::Dependency
98
83
  name: simplecov
99
84
  requirement: !ruby/object:Gem::Requirement
@@ -160,11 +145,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
160
145
  licenses:
161
146
  - Apache-2.0
162
147
  metadata:
163
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.21.0/file.CHANGELOG.html
148
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.24.0/file.CHANGELOG.html
164
149
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/common
165
150
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
166
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.21.0
167
- post_install_message:
151
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-common/v0.24.0
168
152
  rdoc_options: []
169
153
  require_paths:
170
154
  - lib
@@ -172,15 +156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
156
  requirements:
173
157
  - - ">="
174
158
  - !ruby/object:Gem::Version
175
- version: '3.0'
159
+ version: '3.3'
176
160
  required_rubygems_version: !ruby/object:Gem::Requirement
177
161
  requirements:
178
162
  - - ">="
179
163
  - !ruby/object:Gem::Version
180
164
  version: '0'
181
165
  requirements: []
182
- rubygems_version: 3.2.33
183
- signing_key:
166
+ rubygems_version: 4.0.6
184
167
  specification_version: 4
185
168
  summary: Common helpers for OpenTelemetry
186
169
  test_files: []