diff --git a/src/routes/autohooks.js b/src/routes/autohooks.js
index bc26d55d9f131915fbc21bc0fb7bbf5c330db83e..31189282f65f123a58921ac6ffd7e133f59542c4 100644
--- a/src/routes/autohooks.js
+++ b/src/routes/autohooks.js
@@ -42,7 +42,7 @@ export default async function (app, opts) {
 
   // Logs the request with the 'debug' level and also logs headers with the 'trace' level
   app.addHook('onResponse', (req, reply, done) => {
-    const responseTime = reply.getResponseTime()
+    const responseTime = reply.elapsedTime
     const loggingOptions = { url: req.raw.url, res: reply, method: req.method, responseTime }
     /* c8 ignore next */
     if (process.env.LOG_LEVEL === 'trace') loggingOptions.headers = req.headers