opentelemetry-api 1.0.0.rc2 → 1.0.0.rc3
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: b873eaad4492b7cefaebdf1a9e5e9998f8af3192340d0d4eae0d2e7c32964e16
|
4
|
+
data.tar.gz: a7a4c5c20d299ac33d0cae853104ee8f33a2f8e4436888e5259a706b0061d6cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9689040364ba9f92dbd9b4af6a95c5d9e0adbffb805ed79f3d0e4a7e2061fd6ac0d5dec6ec50ef5e4fe290dfd74c3779a0331145b9ebee5fe83dc9551bdf58a
|
7
|
+
data.tar.gz: 0127d9a7168c4f275a132b63f038d0e4f58105d72475e70ab2db03f3a868dc85d2252e5c50bf5b52af713b0018c33a4d8366a872ba4d1522304e2d8f5e8d5360
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Release History: opentelemetry-api
|
2
2
|
|
3
|
+
### v1.0.0.rc3 / 2021-08-12
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Remove optional parent_context from in_span
|
6
|
+
* BREAKING CHANGE: Refactor Baggage to remove Noop*
|
7
|
+
* BREAKING CHANGE: Total order constraint on span.status=
|
8
|
+
|
9
|
+
* ADDED: Add Tracer.non_recording_span to API
|
10
|
+
* ADDED: Make API's NoopTextMapPropagator private
|
11
|
+
* FIXED: Remove optional parent_context from in_span
|
12
|
+
* FIXED: Reduce span allocation in API
|
13
|
+
* FIXED: Refactor Baggage to remove Noop*
|
14
|
+
* FIXED: Total order constraint on span.status=
|
15
|
+
* FIXED: Return early if carrier is nil
|
16
|
+
* FIXED: Update context to match spec
|
17
|
+
* FIXED: Return the original context if the baggage header value is empty
|
18
|
+
* DOCS: Update docs to rely more on environment variable configuration
|
19
|
+
|
3
20
|
### v1.0.0.rc2 / 2021-06-23
|
4
21
|
|
5
22
|
* BREAKING CHANGE: Remove optional parent_context from in_span [729](https://github.com/open-telemetry/opentelemetry-ruby/pull/729)
|
data/README.md
CHANGED
@@ -29,11 +29,11 @@ Then, use the OpenTelemetry interfaces to produces traces and other telemetry da
|
|
29
29
|
```ruby
|
30
30
|
require 'opentelemetry'
|
31
31
|
|
32
|
-
# Obtain the current default tracer
|
33
|
-
|
32
|
+
# Obtain the current default tracer provider
|
33
|
+
provider = OpenTelemetry.tracer_provider
|
34
34
|
|
35
35
|
# Create a trace
|
36
|
-
tracer =
|
36
|
+
tracer = provider.tracer('my_app', '1.0')
|
37
37
|
|
38
38
|
# Record spans
|
39
39
|
tracer.in_span('my_task') do |task_span|
|
@@ -39,7 +39,8 @@ module OpenTelemetry
|
|
39
39
|
end
|
40
40
|
|
41
41
|
# Extract remote baggage from the supplied carrier.
|
42
|
-
# If extraction fails
|
42
|
+
# If extraction fails or there is no baggage to extract,
|
43
|
+
# then the original context will be returned
|
43
44
|
#
|
44
45
|
# @param [Carrier] carrier The carrier to get the header from
|
45
46
|
# @param [optional Context] context Context to be updated with the baggage
|
@@ -52,7 +53,7 @@ module OpenTelemetry
|
|
52
53
|
# if extraction fails
|
53
54
|
def extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter)
|
54
55
|
header = getter.get(carrier, BAGGAGE_KEY)
|
55
|
-
return context
|
56
|
+
return context if header.nil? || header.empty?
|
56
57
|
|
57
58
|
entries = header.gsub(/\s/, '').split(',')
|
58
59
|
|
@@ -7,41 +7,17 @@
|
|
7
7
|
module OpenTelemetry
|
8
8
|
class Context
|
9
9
|
module Propagation
|
10
|
-
#
|
10
|
+
# @api private
|
11
11
|
class NoopTextMapPropagator
|
12
12
|
EMPTY_LIST = [].freeze
|
13
13
|
private_constant(:EMPTY_LIST)
|
14
14
|
|
15
|
-
# Injects the provided context into a carrier.
|
16
|
-
#
|
17
|
-
# @param [Object] carrier A mutable carrier to inject context into.
|
18
|
-
# @param [optional Context] context Context to be injected into carrier. Defaults
|
19
|
-
# to +Context.current+.
|
20
|
-
# @param [optional Setter] setter If the optional setter is provided, it
|
21
|
-
# will be used to write context into the carrier, otherwise the default
|
22
|
-
# setter will be used.
|
23
15
|
def inject(carrier, context: Context.current, setter: Context::Propagation.text_map_setter); end
|
24
16
|
|
25
|
-
# Extracts and returns context from a carrier. Returns the provided
|
26
|
-
# context and logs a warning if an error if extraction fails.
|
27
|
-
#
|
28
|
-
# @param [Object] carrier The carrier to extract context from.
|
29
|
-
# @param [optional Context] context Context to be updated with the state
|
30
|
-
# extracted from the carrier. Defaults to +Context.current+.
|
31
|
-
# @param [optional Getter] getter If the optional getter is provided, it
|
32
|
-
# will be used to read the header from the carrier, otherwise the default
|
33
|
-
# getter will be used.
|
34
|
-
#
|
35
|
-
# @return [Context] a new context updated with state extracted from the
|
36
|
-
# carrier
|
37
17
|
def extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter)
|
38
18
|
context
|
39
19
|
end
|
40
20
|
|
41
|
-
# Returns the predefined propagation fields. If your carrier is reused, you
|
42
|
-
# should delete the fields returned by this method before calling +inject+.
|
43
|
-
#
|
44
|
-
# @return [Array<String>] a list of fields that will be used by this propagator.
|
45
21
|
def fields
|
46
22
|
EMPTY_LIST
|
47
23
|
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.0.0.
|
4
|
+
version: 1.0.0.rc3
|
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-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ipsa
|
@@ -187,10 +187,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
187
187
|
licenses:
|
188
188
|
- Apache-2.0
|
189
189
|
metadata:
|
190
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.0.0.
|
190
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.0.0.rc3/file.CHANGELOG.html
|
191
191
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/api
|
192
192
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
193
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.0.0.
|
193
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-api/v1.0.0.rc3
|
194
194
|
post_install_message:
|
195
195
|
rdoc_options: []
|
196
196
|
require_paths:
|