diff --git a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py index d5f14011be..f20efd5ecf 100644 --- a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py +++ b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py @@ -97,7 +97,7 @@ def inject( self.SAMPLING_PRIORITY_KEY, str(constants.AUTO_KEEP if sampled else constants.AUTO_REJECT), ) - if constants.DD_ORIGIN in span.context.trace_state: + if span.context.trace_state.get(constants.DD_ORIGIN): set_in_carrier( carrier, self.ORIGIN_KEY,