You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2024/11/06 01:05:01 UTC
(skywalking-python) branch master updated: Fix TestClient for fastapi cause the req.client None error (#355)
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 55dc5ff Fix TestClient for fastapi cause the req.client None error (#355)
55dc5ff is described below
commit 55dc5ff813106c579378a55a3cbff07f9c6689df
Author: CharlieSeastar <49...@users.noreply.github.com>
AuthorDate: Wed Nov 6 09:04:56 2024 +0800
Fix TestClient for fastapi cause the req.client None error (#355)
---
CHANGELOG.md | 11 +++++++++++
skywalking/plugins/sw_fastapi.py | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8aaedf0..381dc5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
## Change Logs
+### 1.2.0
+
+- Feature:
+ - Drop support for 3.7 (#356)
+
+- Fixes:
+ - Fix: user/password replacement is not allowed for relative URLs (#349)
+ - Fix pulsar client does not support init arguments other than service_url (#351)
+ - Fix outdated make dev-fix rule in CodeStyle.md (#350)
+ - Fix TestClient for fastapi cause the req.client None error (#355)
+
### 1.1.0
- Feature:
diff --git a/skywalking/plugins/sw_fastapi.py b/skywalking/plugins/sw_fastapi.py
index 45ce504..9acba50 100644
--- a/skywalking/plugins/sw_fastapi.py
+++ b/skywalking/plugins/sw_fastapi.py
@@ -56,7 +56,7 @@ def install():
with span:
span.layer = Layer.Http
span.component = Component.FastAPI
- span.peer = f'{req.client.host}:{req.client.port}'
+ span.peer = f'{req.client.host}:{req.client.port}' if req.client else 'unknown'
span.tag(TagHttpMethod(method))
span.tag(TagHttpURL(str(req.url).split('?')[0]))
if config.plugin_fastapi_collect_http_params and req.query_params: