Skip to content

Commit

Permalink
fix: b3 propagation needs to check if parent is SpanContext (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrex authored Apr 30, 2020
1 parent d01d779 commit c772bb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def inject(
set_in_carrier(
carrier,
self.PARENT_SPAN_ID_KEY,
format_span_id(span.parent.context.span_id),
format_span_id(span.parent.span_id),
)
set_in_carrier(carrier, self.SAMPLED_KEY, "1" if sampled else "0")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_child_parent_new_carrier(old_carrier):
trace_flags=parent_context.trace_flags,
trace_state=parent_context.trace_state,
),
parent=parent,
parent=parent.get_context(),
)

new_carrier = {}
Expand Down

0 comments on commit c772bb7

Please sign in to comment.