Skip to content

Commit

Permalink
Exports span attributes to ETW
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan committed Oct 20, 2021
1 parent 55a6517 commit ed834df
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -837,9 +837,12 @@ class Span : public trace::Span
*/
void SetAttribute(nostd::string_view key, const common::AttributeValue &value) noexcept override
{
// TODO: not implemented
UNREFERENCED_PARAMETER(key);
UNREFERENCED_PARAMETER(value);
// don't override fields propagated from span data.
if (key == ETW_FIELD_NAME || key == ETW_FIELD_SPAN_ID || key == ETW_FIELD_TRACE_ID)
{
return;
}
attributes_[std::string{key}].FromAttributeValue(value);
}

/**
Expand Down

0 comments on commit ed834df

Please sign in to comment.