New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to record the time spent in the sanic request #833
Comments
Are you talking about the |
Sanic seems not provide this feature, you may need use
|
@yunstanford sorry, i dont know what lat is. |
@lixxu Yes, it works.Thanks a lot. |
|
@yunstanford yes, i can get the access log from my nginx, and @lixxu 's idea can also solve my issue.I just want to use this data to simply measure the performance of a handler. |
Can I re-open this issue? I want to log latency as part of my access logs, but doesn't seem like I can right now because:
It doesn't seem entirely straightforward to add response time taken to just the worker, as its response handling is dealt with elsewhere... |
@victorandree sanic does not seem to have the default configuration. i have to use logging in the response middleware like:
The daily visit of this project is about 10 million, it seems no problem. because of i am not use gunicorn, I can not give any other help. you can reopen it if you think it is necessary. |
The time spend on each visit is recorded in tornado, like this:
Can sanic do it with an efficient way? Thanks for your help.
The text was updated successfully, but these errors were encountered: