Join Slack
Powered by
is there anyhow I could log the execution time of ...
# ktor
g
gotoOla
12/04/2018, 12:17 PM
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
cy
12/04/2018, 12:20 PM
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
cy
12/04/2018, 12:20 PM
For production use you can use metrics:
https://ktor.io/servers/features/metrics.html
g
gotoOla
12/04/2018, 1:10 PM
cool, thanks!
6
Views
Open in Slack
Previous
Next