Skip to content

Commit

Permalink
Don't set tags which are None
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Michael Stella committed Dec 22, 2020
1 parent f6f5b90 commit 2a58e32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2a58e32

Please sign in to comment.