opentelemetry-api 1.6.0 → 1.7.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/opentelemetry/trace/span.rb +0 -24
- data/lib/opentelemetry/trace/tracer.rb +8 -5
- data/lib/opentelemetry/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dbc39ae2e689608cb056105d3c038362070fe52d8ee653de0426f1c55766faf
|
4
|
+
data.tar.gz: c9a9c610b7f5f986d18df5e5b3a76d5fed3fcf94067abef7eeaaa79a32fa9a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2f0d816874f16b73a7b137a1452beea256834d4ed6b777fe88981ec9216de730b28b07fe23f001b41491f2038be168116fc08b17848f22156b6dc3a584ddf73
|
7
|
+
data.tar.gz: b32b57334ebac36284710f5fc1a1e5f3277458b9caa91a94063f104e038bde8238c3293d25598b43ea693d2d2a261f7d9be0a2e285696e5d942ec27ae649893e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Release History: opentelemetry-api
|
2
2
|
|
3
|
+
### v1.7.0 / 2025-09-17
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Remove Span APIs for attributes and events
|
6
|
+
|
7
|
+
* ADDED: Add record_exception option for in_span
|
8
|
+
* FIXED: Remove Span APIs for attributes and events
|
9
|
+
|
3
10
|
### v1.6.0 / 2025-08-14
|
4
11
|
|
5
12
|
- ADDED: Add noop methods on Trace::Span for `attributes` and `events`
|
@@ -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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.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: 2025-
|
11
|
+
date: 2025-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ipsa
|
@@ -215,10 +215,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
215
215
|
licenses:
|
216
216
|
- Apache-2.0
|
217
217
|
metadata:
|
218
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.
|
218
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.7.0/file.CHANGELOG.html
|
219
219
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/api
|
220
220
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
221
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.
|
221
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.7.0
|
222
222
|
post_install_message:
|
223
223
|
rdoc_options: []
|
224
224
|
require_paths:
|