You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m not sure why you want to trace a TestClient? I think TestClient is for test only and don’t have a peer as expected
Since this decorator is used in the actual code, it isn’t necessary to trace when running the FastAPI TestClient. However, it does impact the actual test results. I shouldn’t have to modify my code just to run tests
Search before asking
Apache SkyWalking Component
Python Agent (apache/skywalking-python)
What happened
sw-fastapi plugin fail to set span.peers when using Fastapi TestClient
What you expected to happen
Fastapi TestClient work properly
How to reproduce
Adding decorator
@trace
to a custom middleware in Fastapi, and use TestClient to invoke any router.in custom_middleware.py
in test_demo.py
run
pytest
then
in skywalking/plugins/sw_fastapi.py line 59
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: