File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class GrpcClientCarrier : public opentelemetry::context::propagation::TextMapCar
3838 opentelemetry::nostd::string_view value) noexcept override
3939 {
4040 std::cout << " Client ::: Adding " << key << " " << value << " \n " ;
41- context_->AddMetadata (key. data ( ), value. data ( ));
41+ context_->AddMetadata (std::string (key ), std::string (value ));
4242 }
4343
4444 ClientContext *context_;
@@ -52,7 +52,7 @@ class GrpcServerCarrier : public opentelemetry::context::propagation::TextMapCar
5252 virtual opentelemetry::nostd::string_view Get (
5353 opentelemetry::nostd::string_view key) const noexcept override
5454 {
55- auto it = context_->client_metadata ().find (key.data ());
55+ auto it = context_->client_metadata ().find ({ key.data (), key. size ()} );
5656 if (it != context_->client_metadata ().end ())
5757 {
5858 return it->second .data ();
You can’t perform that action at this time.
0 commit comments