-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: change SpanContext.traceFlags to mandatory #818
fix: change SpanContext.traceFlags to mandatory #818
Conversation
9e981d3
to
0d174bf
Compare
Codecov Report
@@ Coverage Diff @@
## master #818 +/- ##
==========================================
- Coverage 94.14% 92.68% -1.46%
==========================================
Files 253 244 -9
Lines 11000 10774 -226
Branches 1046 1025 -21
==========================================
- Hits 10356 9986 -370
- Misses 644 788 +144
|
According to spec SpanContext represents the W3C tracestate which includes traceId, spanId and traceFlags. As a side effect a new LinkContext types was added as links don't have traceFlags according to spec.
0d174bf
to
baf5c58
Compare
packages/opentelemetry-api/test/noop-implementations/noop-tracer.test.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-core/src/context/propagation/BinaryTraceContext.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-core/test/context/BinaryTraceContext.test.ts
Outdated
Show resolved
Hide resolved
One point is maybe worth to consider: |
I actually think if anything it would be the opposite. Link context is defined in terms of span context and not the other way around. I think it might be more useful to define it as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Seems CI failed once again unrelated in I noticed also following warning in log which may indicate that something should be adapted in http plugin: |
I'm on my phone right now so I can't do it but I think this is ready to merge whenever |
* fix: change SpanContext.traceFlags to mandatory According to spec SpanContext represents the W3C tracestate which includes traceId, spanId and traceFlags. As a side effect a new LinkContext types was added as links don't have traceFlags according to spec. * chore: review findings, rename TraceFlags.UNSAMPLED to NONE * fix: build * fix: tests * fix: correct merge Co-authored-by: Daniel Dyla <[email protected]>
* fix: change SpanContext.traceFlags to mandatory According to spec SpanContext represents the W3C tracestate which includes traceId, spanId and traceFlags. As a side effect a new LinkContext types was added as links don't have traceFlags according to spec. * chore: review findings, rename TraceFlags.UNSAMPLED to NONE * fix: build * fix: tests * fix: correct merge Co-authored-by: Daniel Dyla <[email protected]>
…pen-telemetry#818) * fix hasOwnProperty check * Revert "fix hasOwnProperty check" This reverts commit 671021cb6e9732ef14ef50f69feabaa3d49d61a4. * fix(opentelemetry/instrumentation-redis) hasOwnProperty check fixes duplicate call check in my project this code was called a second time based on importing. However in the case it was called again the check would fail. By switching to hasOwnProperty it fixes this issue. * adding tests and changing stream check to not crash * fix(opentelemetry/instrumentation-redis) changing has stream check This reverts commit 5a04acc4b9ce47713c0fc5eec18cdd5ad52ab70d. * style: fix lint Co-authored-by: Jonathan Campos <[email protected]>
Which problem is this PR solving?
According to spec SpanContext represents the W3C tracestate which includes traceId, spanId and traceFlags.
As a side effect a new LinkContext types was added as links don't have traceFlags according to spec.
Short description of the changes
Adapt type definitons to match spec.