Skip to content

Commit

Permalink
Fix assertion to check the correct attribute value type (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Jul 3, 2021
1 parent 016bb85 commit 4292a57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exporters/otlp/src/otlp_recordable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ void PopulateAttribute(opentelemetry::proto::common::v1::KeyValue *attribute,
{
// Assert size of variant to ensure that this method gets updated if the variant
// definition changes
static_assert(nostd::variant_size<opentelemetry::common::AttributeValue>::value ==
kOwnedAttributeValueSize + 1,
"AttributeValue contains unknown type");
static_assert(
nostd::variant_size<sdk::common::OwnedAttributeValue>::value == kOwnedAttributeValueSize,
"OwnedAttributeValue contains unknown type");

attribute->set_key(key.data(), key.size());

Expand Down

0 comments on commit 4292a57

Please sign in to comment.