Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff committed Jan 11, 2024
1 parent 2969196 commit 18626ec
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/include/opentelemetry/trace/trace_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TraceFlags final
{
public:
static constexpr uint8_t kIsSampled = 1;
static constexpr uint8_t kIsRandom = 2;
static constexpr uint8_t kIsRandom = 2;

TraceFlags() noexcept : rep_{0} {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Recordable final : public sdk::trace::Recordable

void SetName(nostd::string_view name) noexcept override;

void SetTraceFlags(opentelemetry::trace::TraceFlags flags) noexcept override;

void SetStartTime(opentelemetry::common::SystemTimestamp start_time) noexcept override;

void SetSpanKind(opentelemetry::trace::SpanKind span_kind) noexcept override;
Expand Down
6 changes: 6 additions & 0 deletions exporters/zipkin/src/recordable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ void Recordable::SetName(nostd::string_view name) noexcept
span_["name"] = name.data();
}

void Recordable::SetTraceFlags(opentelemetry::trace::TraceFlags /* flags */) noexcept
{
// TODO: Currently not supported by specs:
// https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk_exporters/zipkin.md
}

void Recordable::SetResource(const sdk::resource::Resource &resource) noexcept
{
// only service.name attribute is supported by specs as of now.
Expand Down
5 changes: 1 addition & 4 deletions sdk/include/opentelemetry/sdk/trace/span_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,7 @@ class SpanData final : public Recordable
name_ = std::string(name.data(), name.length());
}

void SetTraceFlags(opentelemetry::trace::TraceFlags flags) noexcept override
{
flags_ = flags;
}
void SetTraceFlags(opentelemetry::trace::TraceFlags flags) noexcept override { flags_ = flags; }

void SetSpanKind(opentelemetry::trace::SpanKind span_kind) noexcept override
{
Expand Down

0 comments on commit 18626ec

Please sign in to comment.