We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0db50ad commit 6d66863Copy full SHA for 6d66863
sentry_sdk/opentelemetry/span_processor.py
@@ -289,9 +289,10 @@ def _span_to_json(self, span):
289
if parent_span_id:
290
span_json["parent_span_id"] = parent_span_id
291
292
- if getattr(span, "attributes", {}) or {}:
+ attributes = getattr(span, "attributes", {}) or {}
293
+ if attributes:
294
span_json["data"] = {}
- for key, value in span.attributes.items():
295
+ for key, value in attributes.items():
296
if not key.startswith("_"):
297
span_json["data"][key] = value
298
0 commit comments