Skip to content

Commit

Permalink
Fixed recordable creation bug, attributes are set before passing reco…
Browse files Browse the repository at this point in the history
…rdable to processor (open-telemetry#189)
  • Loading branch information
kmanghat authored Jul 17, 2020
1 parent 876875d commit 879c2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/src/trace/span.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Span::Span(std::shared_ptr<Tracer> &&tracer,
{
return;
}
processor_->OnStart(*recordable_);
recordable_->SetName(name);

attributes.ForEachKeyValue([&](nostd::string_view key, common::AttributeValue value) noexcept {
Expand All @@ -63,6 +62,7 @@ Span::Span(std::shared_ptr<Tracer> &&tracer,

recordable_->SetStartTime(NowOr(options.start_system_time));
start_steady_time = NowOr(options.start_steady_time);
processor_->OnStart(*recordable_);
}

Span::~Span()
Expand Down

0 comments on commit 879c2bf

Please sign in to comment.