Logging request time

Is there any way to output ‘request time’ in the access log?

It helps us monitor server health.

Request time here means the time taken by the server to service a request. In Nginx, it’s called $request_time

It’s extremely helpful to know if something goes wrong at any point with the hw, such as disk or CPU being under strain.

This is in the logs as the "duration" field.

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.