opentelemetry-api 1.6.0 → 1.8.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f11a76af9f2ba1d343054dbc32ad2fd70ab86c8ae42154dfcb9ee9b6e9cb3327
|
|
4
|
+
data.tar.gz: 61664c15a5454caedaa4bab9acaa10dddeab1d19ae7c71b3327d9da043e1468c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 30a1fa7d79d17d79854580b70ef6d99403bbcb2547f3b80a9f52cbd3057c852c53525674c715397570a3e0c4d44c5e63707e4b318970eae697571ad5f342874c
|
|
7
|
+
data.tar.gz: 22bf247b52f1c679c158a40aa1e1b2ca261db86211ea8e2fc8ba285bcc755f732295c91e6794200157859f5afadfc171c3d9e106c7586465af946599ce4305c2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Release History: opentelemetry-api
|
|
2
2
|
|
|
3
|
+
### v1.8.0 / 2026-03-10
|
|
4
|
+
|
|
5
|
+
* ADDED: Replace cgi with uri for encode and decode (#2028)
|
|
6
|
+
|
|
7
|
+
### v1.7.0 / 2025-09-17
|
|
8
|
+
|
|
9
|
+
- BREAKING CHANGE: Remove Span APIs for attributes and events
|
|
10
|
+
|
|
11
|
+
- ADDED: Add record_exception option for in_span
|
|
12
|
+
- FIXED: Remove Span APIs for attributes and events
|
|
13
|
+
|
|
3
14
|
### v1.6.0 / 2025-08-14
|
|
4
15
|
|
|
5
16
|
- ADDED: Add noop methods on Trace::Span for `attributes` and `events`
|
|
@@ -183,7 +194,7 @@
|
|
|
183
194
|
### v0.7.0 / 2020-10-07
|
|
184
195
|
|
|
185
196
|
- FIXED: Safely navigate span variable during error cases
|
|
186
|
-
- DOCS: Standardize
|
|
197
|
+
- DOCS: Standardize top-level docs structure and readme
|
|
187
198
|
- DOCS: Fix param description in TextMapInjector for Baggage
|
|
188
199
|
|
|
189
200
|
### v0.6.0 / 2020-09-10
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
|
|
7
|
-
require '
|
|
7
|
+
require 'uri'
|
|
8
8
|
|
|
9
9
|
module OpenTelemetry
|
|
10
10
|
module Baggage
|
|
@@ -63,7 +63,7 @@ module OpenTelemetry
|
|
|
63
63
|
# the W3C spec where it's referred to as properties. We preserve
|
|
64
64
|
# the properties (as-is) so that they can be propagated elsewhere.
|
|
65
65
|
kv, meta = entry.split(';', 2)
|
|
66
|
-
k, v = kv.split('=').map!(&
|
|
66
|
+
k, v = kv.split('=').map!(&URI.method(:decode_uri_component))
|
|
67
67
|
builder.set_value(k, v, metadata: meta)
|
|
68
68
|
end
|
|
69
69
|
end
|
|
@@ -99,7 +99,7 @@ module OpenTelemetry
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
def encode_value(key, entry)
|
|
102
|
-
result = +"#{
|
|
102
|
+
result = +"#{URI.encode_uri_component(key.to_s)}=#{URI.encode_uri_component(entry.value.to_s)}"
|
|
103
103
|
# We preserve metadata received on extract and assume it's already formatted
|
|
104
104
|
# for transport. It's sent as-is without further processing.
|
|
105
105
|
result << ";#{entry.metadata}" if entry.metadata
|
|
@@ -78,18 +78,6 @@ module OpenTelemetry
|
|
|
78
78
|
self
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
# Retrieve attributes
|
|
82
|
-
#
|
|
83
|
-
# Note that the OpenTelemetry project
|
|
84
|
-
# {https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md
|
|
85
|
-
# documents} certain "standard attributes" that have prescribed semantic
|
|
86
|
-
# meanings.
|
|
87
|
-
#
|
|
88
|
-
# @return [hash] returns empty hash
|
|
89
|
-
def attributes
|
|
90
|
-
{}
|
|
91
|
-
end
|
|
92
|
-
|
|
93
81
|
# Add a link to a {Span}.
|
|
94
82
|
#
|
|
95
83
|
# Adding links at span creation using the `links` option is preferred
|
|
@@ -135,18 +123,6 @@ module OpenTelemetry
|
|
|
135
123
|
self
|
|
136
124
|
end
|
|
137
125
|
|
|
138
|
-
# Retrieve events
|
|
139
|
-
#
|
|
140
|
-
# Note that the OpenTelemetry project
|
|
141
|
-
# {https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-semantic-conventions.md
|
|
142
|
-
# documents} certain "standard event names and keys" which have
|
|
143
|
-
# prescribed semantic meanings.
|
|
144
|
-
#
|
|
145
|
-
# @return [array] returns empty array
|
|
146
|
-
def events
|
|
147
|
-
[]
|
|
148
|
-
end
|
|
149
|
-
|
|
150
126
|
# Record an exception during the execution of this span. Multiple exceptions
|
|
151
127
|
# can be recorded on a span.
|
|
152
128
|
#
|
|
@@ -31,12 +31,12 @@ module OpenTelemetry
|
|
|
31
31
|
#
|
|
32
32
|
# @yield [span, context] yields the newly created span and a context containing the
|
|
33
33
|
# span to the block.
|
|
34
|
-
def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
|
|
34
|
+
def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil, record_exception: true)
|
|
35
35
|
span = nil
|
|
36
36
|
span = start_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind)
|
|
37
37
|
Trace.with_span(span) { |s, c| yield s, c }
|
|
38
38
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
39
|
-
span&.record_exception(e)
|
|
39
|
+
span&.record_exception(e) if record_exception
|
|
40
40
|
span&.status = Status.error("Unhandled exception of type: #{e.class}")
|
|
41
41
|
raise e
|
|
42
42
|
ensure
|
|
@@ -58,10 +58,13 @@ module OpenTelemetry
|
|
|
58
58
|
def start_span(name, with_parent: nil, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
|
|
59
59
|
span = OpenTelemetry::Trace.current_span(with_parent)
|
|
60
60
|
|
|
61
|
-
if span.
|
|
62
|
-
span
|
|
61
|
+
if span.recording?
|
|
62
|
+
OpenTelemetry::Trace.non_recording_span(span.context)
|
|
63
63
|
else
|
|
64
|
-
|
|
64
|
+
# Either the span is valid and non-recording, in which case we return it,
|
|
65
|
+
# or there was no span in the Context and Trace.current_span returned Span::INVALID,
|
|
66
|
+
# which is what we're supposed to return.
|
|
67
|
+
span
|
|
65
68
|
end
|
|
66
69
|
end
|
|
67
70
|
end
|
metadata
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opentelemetry-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenTelemetry Authors
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
13
|
+
name: logger
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0
|
|
20
|
-
type: :
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0
|
|
25
|
+
version: '0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
27
|
+
name: benchmark-ipsa
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
|
-
- - "
|
|
30
|
+
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
32
|
+
version: 0.2.0
|
|
34
33
|
type: :development
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
|
-
- - "
|
|
37
|
+
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
39
|
+
version: 0.2.0
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: concurrent-ruby
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,14 +99,14 @@ dependencies:
|
|
|
100
99
|
requirements:
|
|
101
100
|
- - "~>"
|
|
102
101
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
102
|
+
version: '13.3'
|
|
104
103
|
type: :development
|
|
105
104
|
prerelease: false
|
|
106
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
106
|
requirements:
|
|
108
107
|
- - "~>"
|
|
109
108
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
109
|
+
version: '13.3'
|
|
111
110
|
- !ruby/object:Gem::Dependency
|
|
112
111
|
name: rubocop
|
|
113
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -215,11 +214,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
|
215
214
|
licenses:
|
|
216
215
|
- Apache-2.0
|
|
217
216
|
metadata:
|
|
218
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.
|
|
217
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.8.0/file.CHANGELOG.html
|
|
219
218
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/api
|
|
220
219
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
|
221
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.
|
|
222
|
-
post_install_message:
|
|
220
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.8.0
|
|
223
221
|
rdoc_options: []
|
|
224
222
|
require_paths:
|
|
225
223
|
- lib
|
|
@@ -234,8 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
234
232
|
- !ruby/object:Gem::Version
|
|
235
233
|
version: '0'
|
|
236
234
|
requirements: []
|
|
237
|
-
rubygems_version:
|
|
238
|
-
signing_key:
|
|
235
|
+
rubygems_version: 4.0.3
|
|
239
236
|
specification_version: 4
|
|
240
237
|
summary: A stats collection and distributed tracing framework
|
|
241
238
|
test_files: []
|