opentelemetry-propagator-ottrace 0.19.2 → 0.19.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +11 -1
- data/lib/opentelemetry/propagator/ottrace/text_map_propagator.rb +10 -1
- data/lib/opentelemetry/propagator/ottrace/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: 7a060f65dc3023d234e5ac579656cdac5d342b0065304ab353755c63ee91d01f
|
4
|
+
data.tar.gz: 64bbd78fbb886ff8efe8ea05956f71fb50f16a1d3243c0592c378edcecd82964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2ea92bb675dbf1aad7668b63bf4cee0869df54eab39cf158ab4e15c9dc951d15293fbc3af82b288699798b11be0caef6538681d6ee0540d1ff6e1209bc44ab
|
7
|
+
data.tar.gz: f53cfa0001f2dd3f9cd48bc420e9330eea959c68ed1da1b79bcb44fa4e1b539f471f9d7da9010c6c9bbcd96b35adbe592a8c57525e3cb1251b7ab2fc0be37e8d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -9,9 +9,19 @@ The `opentelemetry-propagator-ottrace` gem contains injectors and extractors for
|
|
9
9
|
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
|
10
10
|
| `ot-tracer-traceid` | uint64 encoded as a string of 16 hex characters | yes |
|
11
11
|
| `ot-tracer-spanid` | uint64 encoded as a string of 16 hex characters | yes |
|
12
|
-
| `ot-tracer-sampled` | boolean encoded as a string with the values `'true'` or `'
|
12
|
+
| `ot-tracer-sampled` | boolean or bit encoded as a string with the values `'true'`,`'false'`, `'1'`, or `'0'` | no |
|
13
13
|
| `ot-baggage-*` | repeated string to string key-value baggage items; keys are prefixed with `ot-baggage-` and the corresponding value is the raw string. | if baggage is present |
|
14
14
|
|
15
|
+
### Sampled Flag vs Bit
|
16
|
+
|
17
|
+
The `ot-tracer-sampled` header is a `boolean` encoded string however the Golang SDK incorrectly sets the `ot-tracer-sampled` header to a `bit` flag.
|
18
|
+
This and other language SDKs compensate for this by supporting both a `bit` and `boolean` encoded strings upon extraction:
|
19
|
+
|
20
|
+
- [Java](https://github.com/open-telemetry/opentelemetry-java/blob/9cea4ef1f92d3186b1bd8296e9daac4281c0f759/extensions/trace-propagators/src/main/java/io/opentelemetry/extension/trace/propagation/Common.java#L41)
|
21
|
+
- [Golang](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/b72c2cd63b9a9917554cbcd709e61f5d8541eea5/propagators/ot/ot_propagator.go#L118)
|
22
|
+
|
23
|
+
This issue was [fixed](https://github.com/open-telemetry/opentelemetry-go-contrib/pull/1358) however this SDK supports both for backward compatibility with older versions of the Golang propagator.
|
24
|
+
|
15
25
|
### Interop and trace ids
|
16
26
|
|
17
27
|
The OT trace propagation format expects trace ids to be 64-bits. In order to
|
@@ -56,7 +56,7 @@ module OpenTelemetry
|
|
56
56
|
span_context = Trace::SpanContext.new(
|
57
57
|
trace_id: Array(trace_id).pack('H*'),
|
58
58
|
span_id: Array(span_id).pack('H*'),
|
59
|
-
trace_flags: sampled
|
59
|
+
trace_flags: as_trace_flags(sampled),
|
60
60
|
remote: true
|
61
61
|
)
|
62
62
|
|
@@ -89,6 +89,15 @@ module OpenTelemetry
|
|
89
89
|
|
90
90
|
private
|
91
91
|
|
92
|
+
def as_trace_flags(sampled)
|
93
|
+
case sampled
|
94
|
+
when 'true', '1'
|
95
|
+
Trace::TraceFlags::SAMPLED
|
96
|
+
else
|
97
|
+
Trace::TraceFlags::DEFAULT
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
92
101
|
def valid?(trace_id:, span_id:)
|
93
102
|
!(VALID_TRACE_ID_REGEX !~ trace_id || VALID_SPAN_ID_REGEX !~ span_id)
|
94
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-propagator-ottrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.3
|
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-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -155,10 +155,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
155
155
|
licenses:
|
156
156
|
- Apache-2.0
|
157
157
|
metadata:
|
158
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-propagator-ottrace/v0.19.
|
158
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-propagator-ottrace/v0.19.3/file.CHANGELOG.html
|
159
159
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/propagator/ottrace
|
160
160
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
161
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-propagator-ottrace/v0.19.
|
161
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-propagator-ottrace/v0.19.3
|
162
162
|
post_install_message:
|
163
163
|
rdoc_options: []
|
164
164
|
require_paths:
|