Commit be8c2a39 authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: use %Ta for timing of haproxy requests

%Tt was not good, because it also included the idle time from previous
request when the connection was reused, causing times recorded in log
files to be much longer the actual request duration.

%Ta - which is described as total active time for the HTTP request,
between the moment the proxy received the first byte of the request
header and the emission of the last byte of the response body - is much
more suitable for our use case of measuring requests durations and is
similar to apache's %D
parent cbef9fed
Pipeline #18148 failed with stage
in 0 seconds
...@@ -172,7 +172,7 @@ listen family_{{ name }} ...@@ -172,7 +172,7 @@ listen family_{{ name }}
# logs # logs
capture request header Referer len 512 capture request header Referer len 512
capture request header User-Agent len 512 capture request header User-Agent len 512
log-format "%{+Q}o %{-Q}ci - - [%trg] %r %ST %B %{+Q}[capture.req.hdr(0)] %{+Q}[capture.req.hdr(1)] %Tt" log-format "%{+Q}o %{-Q}ci - - [%trg] %r %ST %B %{+Q}[capture.req.hdr(0)] %{+Q}[capture.req.hdr(1)] %Ta"
{% for outer_prefix, inner_prefix in family_path_routing_dict.get(name, []) + path_routing_list %} {% for outer_prefix, inner_prefix in family_path_routing_dict.get(name, []) + path_routing_list %}
{% set outer_prefix = outer_prefix.strip('/') -%} {% set outer_prefix = outer_prefix.strip('/') -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment