Skip to content

Commit 6d66863

Browse files
committed
mypy
1 parent 0db50ad commit 6d66863

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sentry_sdk/opentelemetry/span_processor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,10 @@ def _span_to_json(self, span):
289289
if parent_span_id:
290290
span_json["parent_span_id"] = parent_span_id
291291

292-
if getattr(span, "attributes", {}) or {}:
292+
attributes = getattr(span, "attributes", {}) or {}
293+
if attributes:
293294
span_json["data"] = {}
294-
for key, value in span.attributes.items():
295+
for key, value in attributes.items():
295296
if not key.startswith("_"):
296297
span_json["data"][key] = value
297298

0 commit comments

Comments
 (0)