Skip to content

Commit fb08a02

Browse files
authored
Add nil checks
1 parent 0d05ca7 commit fb08a02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/attribute_propagating_span_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ def on_start(self, span: Span, parent_context: Optional[Context] = None) -> None
6666
if is_local_root(span):
6767
if not _is_server_kind(span):
6868
propagation_data = self._propagation_data_extractor(span)
69-
elif _is_server_kind(parent_span):
69+
elif parent_span && _is_server_kind(parent_span):
7070
propagation_data = self._propagation_data_extractor(parent_span)
71-
else:
71+
elif parent_span:
7272
propagation_data = parent_span.attributes.get(self._propagation_data_key)
7373

7474
if propagation_data is not None:

0 commit comments

Comments
 (0)