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 authored and alertedsnake committed Feb 4, 2021
1 parent 2fd68a2 commit f7c0132
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f7c0132

Please sign in to comment.