is there anyhow I could log the execution time of ...
# ktor
g
is there anyhow I could log the execution time of requests with ktor? Is that when the MDC should be used in the callLogging? https://ktor.io/servers/features/call-logging.html
c
There is no reason to use MDC to log times. You can simply intercept the call pipeline and use
measureTimeMillis { }
to measure time and log it
For production use you can use metrics: https://ktor.io/servers/features/metrics.html
g
cool, thanks!