Skip to content

Commit

Permalink
Merge branch 'main' into etw-sampler-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Sep 19, 2022
2 parents f4e0033 + ed9f583 commit 8c00f47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/grpc/tracer_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class GrpcClientCarrier : public opentelemetry::context::propagation::TextMapCar
opentelemetry::nostd::string_view value) noexcept override
{
std::cout << " Client ::: Adding " << key << " " << value << "\n";
context_->AddMetadata(key.data(), value.data());
context_->AddMetadata(std::string(key), std::string(value));
}

ClientContext *context_;
Expand All @@ -52,7 +52,7 @@ class GrpcServerCarrier : public opentelemetry::context::propagation::TextMapCar
virtual opentelemetry::nostd::string_view Get(
opentelemetry::nostd::string_view key) const noexcept override
{
auto it = context_->client_metadata().find(key.data());
auto it = context_->client_metadata().find({key.data(), key.size()});
if (it != context_->client_metadata().end())
{
return it->second.data();
Expand Down

0 comments on commit 8c00f47

Please sign in to comment.