Hello, how would I go about measuring response tim...
# ktor
m
Hello, how would I go about measuring response times? Let's say I want to
println
something like "responded to /some/endpoint in 50ms" for every request. I have found I can access every request with
Copy code
intercept(ApplicationCallPipeline.Monitoring){ /**/ }
but I'd like to access every response before it's sent and some information about it.
d
Well you'd probably want to intercept at some point during intercept pipeline and at the sending phase again for a second timestamp.
You can use attributes on the call to mark the time of reception
m
That works! Thank you.
👍🏻 1