Maybe you want: %<{TS_MILESTONE_UA_CLOSE-TS_MILESTONE_UA_BEGIN}msdms>
See the note under:
https://docs.trafficserver.apache.org/admin-guide/logging/formatting.en.html#timestamps-and-durations
On Mon, May 29, 2023 at 9:42 AM Nuno Jose Baeta <[email protected]> wrote:
> Hello,
>
>
>
> We are using ATS v8.1 and would like to understand better how to log the
> total time spent in a HTTP transaction (including the full body transfer
> time) towards the client.
>
>
>
> For that, we are using the field %<ttms>, for the Client-Proxy Connection
> time.
>
>
>
> Looking at the ATS documentation, the meaning for <ttms> is:
>
> “Time in milliseconds spent by Traffic Server processing the entire client
> request. Measured from the time the connection between the client and
> Traffic Server proxy was established until the last byte of the proxy
> response was delivered to the client.”
>
>
>
> At this moment, our logging.yaml for the access.log is the following:
>
> format: '%<cqtd>:%<cqtt> "%<cqtx>" %<shn> %<shi> %<sssc> %<pfsc>
> %<stms> %<ttms>'
>
>
>
> Log example:
>
> 2023-05-29:14:20:41 "GET
> http://trafficserver/media/stream_421342430.cmfv
> <https://urldefense.com/v3/__http://trafficserver/media/stream_421342430.cmfv__;!!Op6eflyXZCqGR5I!GUMlpWKUbqXtSyyjQipM66jFsagWIGIiNLPqEquheCvVkbeYPqhdYlYml2Y0VHOwEmdAtq6iMYvYzEeyIHk$>
> HTTP/1.1" origin2 0 200 FIN 18 19
>
>
>
> But comparing to client browser network timings, we see times of hundreds
> of milliseconds. For the above example, the total time was 506ms.
>
> HTTP Timing breakdown:
>
> Connection setup: 1.85
>
> Request sent: 30.88
>
> Wait response: 49.44
>
> Content Download: 423.36
>
> *TOTAL: 505.53 ms*
>
>
>
> I cannot find any correlation.
>
> Could you tell if it is possible to achieve this?
>
>
>
> Thanks in advance.
>
> Nuno Baeta
>
> [email protected]
>
>
>
>
>