We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 261ef0b commit ac5c6d1Copy full SHA for ac5c6d1
sentry_sdk/_span_batcher.py
@@ -56,16 +56,15 @@ def add(self, span: "StreamedSpan") -> None:
56
# _add_to_envelope during flush, or _flush_event.wait/set) triggers
57
# a GC-emitted warning that routes back through the logging
58
# integration into add().
59
-
60
if getattr(self._active, "flag", False):
61
return None
62
63
self._active.flag = True
64
65
- if not self._ensure_thread() or self._flusher is None:
66
- return None
67
68
try:
+ if not self._ensure_thread() or self._flusher is None:
+ return None
+
69
with self._lock:
70
size = len(self._span_buffer[span.trace_id])
71
if size >= self.MAX_BEFORE_DROP:
0 commit comments