fix(sqlalchemy): Change context manager type to avoid race in threads… · gitcommit90/sentry-python@de0bc50 · GitHub
Skip to content

Commit de0bc50

Browse files
authored
fix(sqlalchemy): Change context manager type to avoid race in threads (getsentry#1368)
1 parent a6cec41 commit de0bc50

3 files changed

Lines changed: 57 additions & 49 deletions

File tree

sentry_sdk/integrations/django/__init__.py

Lines changed: 3 additions & 3 deletions

sentry_sdk/integrations/sqlalchemy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from sentry_sdk._types import MYPY
44
from sentry_sdk.hub import Hub
55
from sentry_sdk.integrations import Integration, DidNotEnable
6-
from sentry_sdk.tracing_utils import record_sql_queries
6+
from sentry_sdk.tracing_utils import RecordSqlQueries
77

88
try:
99
from sqlalchemy.engine import Engine # type: ignore
@@ -50,7 +50,7 @@ def _before_cursor_execute(
5050
if hub.get_integration(SqlalchemyIntegration) is None:
5151
return
5252

53-
ctx_mgr = record_sql_queries(
53+
ctx_mgr = RecordSqlQueries(
5454
hub,
5555
cursor,
5656
statement,

sentry_sdk/tracing_utils.py

Lines changed: 52 additions & 44 deletions

0 commit comments

Comments
 (0)