Skip to content

Commit 241485f

Browse files
committed
Fix test_traceparent_ows_handling
1 parent 7a7628d commit 241485f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/include/opentelemetry/trace/propagation/http_trace_context.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ class HttpTraceContext : public context::propagation::TextMapPropagator
182182

183183
static SpanContext ExtractImpl(const context::propagation::TextMapCarrier &carrier)
184184
{
185-
nostd::string_view trace_parent = carrier.Get(kTraceParent);
185+
// Get trace_parent after trimming the leading and trailing whitespaces
186+
nostd::string_view trace_parent = detail::TrimString(carrier.Get(kTraceParent));
186187
nostd::string_view trace_state = carrier.Get(kTraceState);
187188
if (trace_parent == "")
188189
{

0 commit comments

Comments
 (0)