Skip to content

Commit bf32e6c

Browse files
authored
fix(sdk): Fix client report recording in multiplexer (#53444)
`MultiplexingTransport` didn't implement `record_lost_event` so our sentry setup is completely missing Client Reports. Note that this is not 100% accurate for some cases like rate limiting on the s4s transport but it's fine.
1 parent f6396a7 commit bf32e6c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sentry/utils/sdk.py

+8
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,14 @@ def _capture_anything(self, method_name, *args, **kwargs):
421421
tags={"reason": "unsafe"},
422422
)
423423

424+
def record_lost_event(self, *args, **kwargs):
425+
# pass through client report recording to sentry_saas_transport
426+
# not entirely accurate for some cases like rate limiting but does the job
427+
if sentry_saas_transport:
428+
record = getattr(sentry_saas_transport, "record_lost_event", None)
429+
if record:
430+
record(*args, **kwargs)
431+
424432
def is_healthy(self):
425433
if sentry4sentry_transport:
426434
if not sentry4sentry_transport.is_healthy():

0 commit comments

Comments
 (0)