From e62fdf95afc93a505fd4cf6c7cf588d618e0a5c8 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Wed, 30 Mar 2022 18:35:13 -0400 Subject: [PATCH] Make sure trace flags are parsed properly when extracting traceparent --- .../src/opentelemetry/trace/propagation/tracecontext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py b/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py index 441a4c7eabd..82cc078efcd 100644 --- a/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py +++ b/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py @@ -79,7 +79,7 @@ def extract( trace_id=int(trace_id, 16), span_id=int(span_id, 16), is_remote=True, - trace_flags=trace.TraceFlags(trace_flags), + trace_flags=trace.TraceFlags(int(trace_flags, 16)), trace_state=tracestate, ) return trace.set_span_in_context(