Best place for metrics module

I want to write my custom nginx module for measuring request processing
time
for every HTTP request received. I need to start counting request
processing
time as early as nginx receives first byte of a request and finish, when
it
sends the last byte in a response. What would the best place be in
nginx
request processing pipeline to plug in my module and these measuring
hooks?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259040,259040#msg-259040

Hello!

On Thu, May 21, 2015 at 08:22:43AM -0400, donatasm wrote:

I want to write my custom nginx module for measuring request processing time
for every HTTP request received. I need to start counting request processing
time as early as nginx receives first byte of a request and finish, when it
sends the last byte in a response. What would the best place be in nginx
request processing pipeline to plug in my module and these measuring hooks?

The $request_time variable looks like what you need, see
http://nginx.org/r/$request_time.


Maxim D.
http://nginx.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs