diff --git a/sentry_sdk/integrations/wsgi.py b/sentry_sdk/integrations/wsgi.py index b186e3c42b..b5ac133107 100644 --- a/sentry_sdk/integrations/wsgi.py +++ b/sentry_sdk/integrations/wsgi.py @@ -267,10 +267,6 @@ def __iter__(self): try: chunk = next(iterator) except StopIteration: - # Close the Sentry transaction (it could be that response.close() is never called by the framework) - # This is done here to make sure the Transaction stays - # open until all streaming responses are done. - finish_running_transaction(self._current_scope) break except BaseException: reraise(*_capture_exception())