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 Apr 7, 2021
1 parent e96a2cd commit 3eb2afc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,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) is not None:
setter.set(
carrier,
self.ORIGIN_KEY,
Expand Down

0 comments on commit 3eb2afc

Please sign in to comment.