Skip to content

Commit f938477

Browse files
committed
easier approx
1 parent 3ef7a39 commit f938477

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/_span_batcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ def add(self, span: "StreamedSpan") -> None:
7676

7777
@staticmethod
7878
def _estimate_size(item: "StreamedSpan") -> int:
79+
# This is just a quick approximation
7980
span_dict = SpanBatcher._to_transport_format(item)
80-
return len(str(span_dict).encode("utf-8")) // 1024
81+
return len(str(span_dict)) // 1024
8182

8283
@staticmethod
8384
def _to_transport_format(item: "StreamedSpan") -> "Any":

0 commit comments

Comments
 (0)