How to set the request start time with HAProxy?
- by Tupy
I would like to measure the time of full request stack. The New Relic capture time of the middleware (e.g. java, python, ruby) and request time (See https://newrelic.com/docs/features/tracking-front-end-time). For this, I need to configure the X-Request-Start header as the request pass through the HAProxy load balance. The haproxy.cfg should look like:
backend www
balance roundrobin
mode http
reqadd "X-Request-Start" UNKNOWN_TIME_FUNCTION()
server servername 192.168.0.1:80 weight 1 check
There is a haproxy native function to replace the UNKNOWN_TIME_FUNCTION()?