Skip to content

Commit 8aca36a

Browse files
committed
.
1 parent 280a120 commit 8aca36a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

sentry_sdk/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -979,10 +979,9 @@ def _capture_telemetry(
979979
# name and attributes.
980980
if isinstance(serialized, dict) and serialized and "name" in serialized:
981981
telemetry.name = serialized["name"] # type: ignore[typeddict-item]
982-
if serialized.get("attributes"):
983-
telemetry._attributes = {}
984-
for k, v in (serialized.get("attributes") or {}).items():
985-
telemetry.set_attribute(k, v)
982+
telemetry._attributes = {}
983+
for k, v in (serialized.get("attributes") or {}).items():
984+
telemetry.set_attribute(k, v)
986985

987986
else:
988987
logger.debug(
@@ -999,6 +998,8 @@ def _capture_telemetry(
999998
batcher = self.metrics_batcher
1000999

10011000
elif ty == "span":
1001+
# We need a reference to the segment span in the batcher to populate
1002+
# the DSC
10021003
serialized["_segment_span"] = telemetry._segment # type: ignore
10031004
batcher = self.span_batcher
10041005

0 commit comments

Comments
 (0)