Skip to content

Commit

Permalink
fix(plugin): fastapi testclient casue None type error in sw_fastapi p…
Browse files Browse the repository at this point in the history
…lugin
  • Loading branch information
CharlieSeastar authored Oct 31, 2024
1 parent 1ce6910 commit 938b797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skywalking/plugins/sw_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def create_span(self, method, scope, req, send, receive):
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:
Expand Down

0 comments on commit 938b797

Please sign in to comment.