-
Notifications
You must be signed in to change notification settings - Fork 451
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
make span context management api public #966
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #966 +/- ##
=======================================
Coverage 95.36% 95.36%
=======================================
Files 161 161
Lines 6780 6780
=======================================
Hits 6465 6465
Misses 315 315
|
api/test/trace/span_benchmark.cc
Outdated
@@ -112,7 +112,7 @@ void BM_SpanCreationWitContextPropagation(benchmark::State &state) | |||
auto outer_span_context = SpanContext(trace_id, span_id, trace_api::TraceFlags(), false); | |||
auto outer_span = | |||
nostd::shared_ptr<trace_api::Span>(new trace_api::DefaultSpan(outer_span_context)); | |||
trace_api::propagation::SetSpan(current_ctx, outer_span); | |||
opentelemetry::trace::SetSpan(current_ctx, outer_span); |
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.
Probably just use trace_api
as it is already used a lot?
@@ -6,7 +6,7 @@ | |||
#include "tracer_common.h" | |||
#include "opentelemetry/trace/span_context_kv_iterable_view.h" | |||
#include "opentelemetry/trace/semantic_conventions.h" | |||
|
|||
#include "opentelemetry/trace/context.h" |
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.
Fix order of header files?
@ThomsonTan - Thanks for reviewing the PR. I have fixed the comments. But had to raise new PR with all these changes( #966 ) as this PR has easycla issue with few commits. Please review that, it already has your suggested changes. |
closing this PR |
Fixes #950
Changes
Move span-context helper methods from
trace::propagation
totrace
namespace. They are now treated as being in public api namespace. It's not possible to move them to Span API ( i.e, making them static within api::Span class ) as the complete implementation ofDefaultSpan
is not visible/available in that class.This is how header structure looks like:
context/context.h - contains implementation for context data-structure logic
trace/tracer.h - span context management ( implicit )
trace/context.h - span context management ( explicit )
The implicit context management are still static methods in
trace::tracer
class to ensure not to introduce a breaking change, and at the same time remain specs compliant.cc @jsuereth
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes