Skip to content

Commit 63a9396

Browse files
committed
.
1 parent 7874a54 commit 63a9396

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

sentry_sdk/_span_batcher.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,15 @@ def _estimate_size(item: "StreamedSpan") -> int:
8787
def _to_transport_format(item: "StreamedSpan") -> "Any":
8888
# TODO[span-first]
8989
res: "dict[str, Any]" = {
90+
"trace_id": item.trace_id,
9091
"span_id": item.span_id,
9192
"name": item._name,
9293
"status": item._status,
9394
}
9495

96+
if item._parent_span_id:
97+
res["parent_span_id"] = item._parent_span_id
98+
9599
if item._attributes:
96100
res["attributes"] = {
97101
k: serialize_attribute(v) for (k, v) in item._attributes.items()
@@ -102,7 +106,7 @@ def _to_transport_format(item: "StreamedSpan") -> "Any":
102106
def _flush(self) -> None:
103107
with self._lock:
104108
if len(self._span_buffer) == 0:
105-
return None
109+
return
106110

107111
envelopes = []
108112
for trace_id, spans in self._span_buffer.items():

0 commit comments

Comments
 (0)