Conversation
|
@kezhenxu94 hello,we want to add fastapi, so everything seems ok, but the response can not catch , could you git us an point to get the response code? the other span seems work ok. Thanks! |
kezhenxu94
left a comment
There was a problem hiding this comment.
Please also add the component to main repo like you did for mysqlclient
|
|
||
| def _sw_get_route_handler(self, scope: Scope, receive: Receive, send: Send): | ||
| from starlette.requests import Request | ||
| print("bububu") |
There was a problem hiding this comment.
Remember to remove all these print lines
| #if isawaitable(resp): | ||
| #result = await resp | ||
| # if resp.status_code >= 400: | ||
| # span.error_occurred = True |
There was a problem hiding this comment.
Did you investigate the source codes of routing.request_response, if it can return both async function and normal function, then the commented codes should work
There was a problem hiding this comment.
I see this method, but the args is func, and app is inner function, I did not try it successful, do not know how to use the inner funncation. I try it again!
|
|
||
| with span: | ||
| span.layer = Layer.Http | ||
| span.component = Component.Flask |
There was a problem hiding this comment.
Should have an individual component for FastAPI?
|
And try to learn some basic git operations to rebase your new PR on the latest master branch, the commit history is too messy |
No description provided.