This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git
The following commit(s) were added to refs/heads/master by this push:
new cea57af fix: ignore websocket connections inside fastapi temporarily
(#244)
cea57af is described below
commit cea57af43850ec1153b1b50a4d7329a23fce5726
Author: jiang1997 <[email protected]>
AuthorDate: Sat Oct 22 07:39:18 2022 +0800
fix: ignore websocket connections inside fastapi temporarily (#244)
---
skywalking/plugins/sw_fastapi.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/skywalking/plugins/sw_fastapi.py b/skywalking/plugins/sw_fastapi.py
index 99a9550..e54844f 100644
--- a/skywalking/plugins/sw_fastapi.py
+++ b/skywalking/plugins/sw_fastapi.py
@@ -42,6 +42,10 @@ def install():
async def _sw_fast_api(self, scope: Scope, receive: Receive, send: Send):
from starlette.requests import Request
+ if scope['type'] == 'websocket':
+ resp = await _original_fast_api(self, scope, receive, send)
+ return resp
+
req = Request(scope, receive=receive, send=send)
carrier = Carrier()
method = req.method