File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class GrpcClientCarrier : public opentelemetry::context::propagation::TextMapCar
38
38
opentelemetry::nostd::string_view value) noexcept override
39
39
{
40
40
std::cout << " Client ::: Adding " << key << " " << value << " \n " ;
41
- context_->AddMetadata (key. data ( ), value. data ( ));
41
+ context_->AddMetadata (std::string (key ), std::string (value ));
42
42
}
43
43
44
44
ClientContext *context_;
@@ -52,7 +52,7 @@ class GrpcServerCarrier : public opentelemetry::context::propagation::TextMapCar
52
52
virtual opentelemetry::nostd::string_view Get (
53
53
opentelemetry::nostd::string_view key) const noexcept override
54
54
{
55
- auto it = context_->client_metadata ().find (key.data ());
55
+ auto it = context_->client_metadata ().find ({ key.data (), key. size ()} );
56
56
if (it != context_->client_metadata ().end ())
57
57
{
58
58
return it->second .data ();
You can’t perform that action at this time.
0 commit comments