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 09a46a140c..400d9132b1 100644 --- a/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py +++ b/exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py @@ -99,7 +99,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,