Skip to content

Commit b31a71e

Browse files
author
Michael Stella
committed
Don't set tags which are None
This is often `None`, but tags are always strings, and so things get broken when spans get passed along to other client calls. Fixes open-telemetry#262
1 parent 0fcb60d commit b31a71e

File tree

1 file changed

+1
-1
lines changed
  • exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog

1 file changed

+1
-1
lines changed

exporter/opentelemetry-exporter-datadog/src/opentelemetry/exporter/datadog/propagator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def inject(
103103
self.SAMPLING_PRIORITY_KEY,
104104
str(constants.AUTO_KEEP if sampled else constants.AUTO_REJECT),
105105
)
106-
if constants.DD_ORIGIN in span.context.trace_state:
106+
if span.context.trace_state.get(constants.DD_ORIGIN) is not None:
107107
setter.set(
108108
carrier,
109109
self.ORIGIN_KEY,

0 commit comments

Comments
 (0)