Apache Logging for Performance

How can I log Apache's performance, i.e. how it takes to process a request? Similar to Tomcat's Valve concept, I'd like to add this logging on Apache to identify a bottleneck on my web app.

I'm using Apache and Tomcat via mod_jk.


You have to create a new log format that adds on response time.

LogFormat "\"%{%Y-%m-%d %H:%M:%S}t\" %V %m \"%U\" \"%q\" %{Content-Type}o %s %B %O %D" responsetime
CustomLog "/var/log/apache2/responsetime.log" responsetime

The %D adds the response time in microseconds to the log. So you can always make your own format for the access log just include the %D somewhere in the log