Skip to content

Commit 9523882

Browse files
committed
Cleanup
1 parent b8c7c1b commit 9523882

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

sentry_sdk/integrations/flask.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from sentry_sdk.integrations.wsgi import SentryWsgiMiddleware
88
from sentry_sdk.scope import should_send_default_pii
99
from sentry_sdk.tracing import SOURCE_FOR_STYLE
10-
from sentry_sdk.tracing_utils import finish_running_transaction
1110
from sentry_sdk.utils import (
1211
capture_internal_exceptions,
1312
ensure_integration_enabled,
@@ -37,7 +36,6 @@
3736
before_render_template,
3837
got_request_exception,
3938
request_started,
40-
request_finished,
4139
)
4240
from markupsafe import Markup
4341
except ImportError:
@@ -84,7 +82,6 @@ def setup_once():
8482

8583
before_render_template.connect(_add_sentry_trace)
8684
request_started.connect(_request_started)
87-
request_finished.connect(_request_finished)
8885
got_request_exception.connect(_capture_exception)
8986

9087
old_app = Flask.__call__
@@ -155,12 +152,6 @@ def _request_started(app, **kwargs):
155152
scope.add_event_processor(evt_processor)
156153

157154

158-
def _request_finished(sender, response, **kwargs):
159-
# type: (Flask, Any, **Any) -> None
160-
# Manually close the transaction because Flask does not call `close()` on the WSGI response
161-
finish_running_transaction()
162-
163-
164155
class FlaskRequestExtractor(RequestExtractor):
165156
def env(self):
166157
# type: () -> Dict[str, str]

0 commit comments

Comments
 (0)