|
7 | 7 | from sentry_sdk.integrations.wsgi import SentryWsgiMiddleware |
8 | 8 | from sentry_sdk.scope import should_send_default_pii |
9 | 9 | from sentry_sdk.tracing import SOURCE_FOR_STYLE |
10 | | -from sentry_sdk.tracing_utils import finish_running_transaction |
11 | 10 | from sentry_sdk.utils import ( |
12 | 11 | capture_internal_exceptions, |
13 | 12 | ensure_integration_enabled, |
|
37 | 36 | before_render_template, |
38 | 37 | got_request_exception, |
39 | 38 | request_started, |
40 | | - request_finished, |
41 | 39 | ) |
42 | 40 | from markupsafe import Markup |
43 | 41 | except ImportError: |
@@ -84,7 +82,6 @@ def setup_once(): |
84 | 82 |
|
85 | 83 | before_render_template.connect(_add_sentry_trace) |
86 | 84 | request_started.connect(_request_started) |
87 | | - request_finished.connect(_request_finished) |
88 | 85 | got_request_exception.connect(_capture_exception) |
89 | 86 |
|
90 | 87 | old_app = Flask.__call__ |
@@ -155,12 +152,6 @@ def _request_started(app, **kwargs): |
155 | 152 | scope.add_event_processor(evt_processor) |
156 | 153 |
|
157 | 154 |
|
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 | | - |
164 | 155 | class FlaskRequestExtractor(RequestExtractor): |
165 | 156 | def env(self): |
166 | 157 | # type: () -> Dict[str, str] |
|
0 commit comments