Skip to content

Commit e619405

Browse files
authored
Merge branch 'ivana/random-perf-improvements' into ivana/remove-decimal
2 parents f81c8f4 + 9f0c233 commit e619405

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

sentry_sdk/integrations/asgi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import sentry_sdk
1313
from sentry_sdk.api import continue_trace
1414
from sentry_sdk.consts import OP
15-
1615
from sentry_sdk.integrations._asgi_common import (
1716
_get_headers,
1817
_get_request_data,
@@ -150,7 +149,7 @@ def __init__(
150149
if asgi_version == 3:
151150
self.__call__ = self._run_asgi3
152151
elif asgi_version == 2:
153-
self.__call__ = self._run_asgi2
152+
self.__call__ = self._run_asgi2 # type: ignore
154153

155154
def _capture_lifespan_exception(self, exc):
156155
# type: (Exception) -> None

sentry_sdk/integrations/django/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ async def sentry_patched_asgi_handler(self, receive, send):
155155
http_methods_to_capture=integration.http_methods_to_capture,
156156
)
157157

158-
return await middleware(self.scope)(receive, send)
158+
return await middleware(self.scope)(receive, send) # type: ignore
159159

160160
cls.__call__ = sentry_patched_asgi_handler
161161

sentry_sdk/integrations/litestar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def __init__(self, app, span_origin=LitestarIntegration.origin):
8585
transaction_style="endpoint",
8686
mechanism_type="asgi",
8787
span_origin=span_origin,
88+
asgi_version=3,
8889
)
8990

9091
def _capture_request_exception(self, exc):
@@ -116,7 +117,6 @@ def injection_wrapper(self, *args, **kwargs):
116117
*(kwargs.get("after_exception") or []),
117118
]
118119

119-
SentryLitestarASGIMiddleware.__call__ = SentryLitestarASGIMiddleware._run_asgi3 # type: ignore
120120
middleware = kwargs.get("middleware") or []
121121
kwargs["middleware"] = [SentryLitestarASGIMiddleware, *middleware]
122122
old__init__(self, *args, **kwargs)

sentry_sdk/integrations/starlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def __init__(self, app, span_origin=StarliteIntegration.origin):
6565
transaction_style="endpoint",
6666
mechanism_type="asgi",
6767
span_origin=span_origin,
68+
asgi_version=3,
6869
)
6970

7071

@@ -94,7 +95,6 @@ def injection_wrapper(self, *args, **kwargs):
9495
]
9596
)
9697

97-
SentryStarliteASGIMiddleware.__call__ = SentryStarliteASGIMiddleware._run_asgi3 # type: ignore
9898
middleware = kwargs.get("middleware") or []
9999
kwargs["middleware"] = [SentryStarliteASGIMiddleware, *middleware]
100100
old__init__(self, *args, **kwargs)

0 commit comments

Comments
 (0)