Log Ktor API response time


I am working on a REST application using Ktor.

To monitor performance, I was trying to get Ktor to output the response time of each request to console, but I could not find any info.

Does anyone know how could I do it? Thanks!

Have a look at that: [[https://ktor.io/docs/metrics-micrometer.html#installing]]

I found it but could not get it to work, for me it seems to expose data to integrate w/ grafana or stuff like that.

Have you used it? I want to print the response time to console

Did you try increasing the debug level, IIRC some of the engines log that kind of info.

1 Like