Skip to content

Commit 1d57bb6

Browse files
committed
asgi fixes
1 parent a44bbf4 commit 1d57bb6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sentry_sdk/integrations/asgi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ async def _run_app(
213213
)
214214

215215
method = scope.get("method", "").upper()
216-
span = None
216+
217217
span_ctx: "ContextManager[Union[Span, StreamedSpan, None]]"
218218
if span_streaming:
219+
span = None
219220
if ty in ("http", "websocket"):
220221
if (
221222
ty == "websocket"
@@ -241,6 +242,7 @@ async def _run_app(
241242
span_ctx = span or nullcontext()
242243

243244
else:
245+
transaction = None
244246
if ty in ("http", "websocket"):
245247
if (
246248
ty == "websocket"

0 commit comments

Comments
 (0)