When running a Flask-like application on Python 3.13 with sentry-sdk 2.8.0, exceptions that should be captured and sent to Sentry are silently
When running a Flask-like application on Python 3.13 with sentry-sdk 2.8.0, exceptions that should be captured and sent to Sentry are silently dropped. A test endpoint that raises an error still returns a 500 status to the client, but Sentry receives 0 events and no error is logged to the project. Sentry middleware appears to crash during exception serialization without raising a visible exception itself.
sentry-sdk 2.8.0 calls copy(frame.f_locals) during exception event serialization. In Python 3.13, frame.f_locals is a FrameLocalsProxy object that does not implement the copy protocol, causing a silent failure in the event building step. No event is constructed; no error is reported to the application. Upgrade to sentry-sdk 2.11.0 or later (verified with 2.71.0). Additionally, migrate from the deprecated Hub API to per-request isolation scopes for full Python 3.13 compatibility: use sentry_sdk.get_scope() instead of Hub.current.scope and SentryWsgiMiddleware instead of SentryMiddleware.