Skip to content

Commit

Permalink
Add nil checks (#234)
Browse files Browse the repository at this point in the history
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
thpierce authored Aug 16, 2024
1 parent 0d05ca7 commit 4f05255
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def on_start(self, span: Span, parent_context: Optional[Context] = None) -> None
if is_local_root(span):
if not _is_server_kind(span):
propagation_data = self._propagation_data_extractor(span)
elif _is_server_kind(parent_span):
elif parent_span and _is_server_kind(parent_span):
propagation_data = self._propagation_data_extractor(parent_span)
else:
elif parent_span:
propagation_data = parent_span.attributes.get(self._propagation_data_key)

if propagation_data is not None:
Expand Down

0 comments on commit 4f05255

Please sign in to comment.