Skip to content

Commit

Permalink
Added new field to span.h of spancontext
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 19, 2020
1 parent bd41f80 commit 051089d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/src/trace/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Span final : public trace_api::Span

bool IsRecording() const noexcept override;

trace_api::SpanContext GetContext() const noexcept override { return trace_api::SpanContext(); }
trace_api::SpanContext GetContext() const noexcept override { return span_context_.get(); }

void SetToken(nostd::unique_ptr<context::Token> &&token) noexcept override;

Expand All @@ -52,6 +52,7 @@ class Span final : public trace_api::Span
mutable std::mutex mu_;
std::unique_ptr<Recordable> recordable_;
opentelemetry::core::SteadyTimestamp start_steady_time;
std::shared_ptr<trace_api::SpanContext> span_context_;
bool has_ended_;
nostd::unique_ptr<context::Token> token_;
};
Expand Down

0 comments on commit 051089d

Please sign in to comment.