]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: spoe: Add metrics in to know time spent in the SPOE
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Mar 2018 08:07:41 +0000 (09:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Apr 2018 13:13:53 +0000 (15:13 +0200)
commitb2dd1e034cf2b9f67ab08b3e98ee22059d071a42
treed81f4dd30e022d9b60d4d8e7daa6b6d35af21d77
parent879dca9a7625746e6d61310adf3c56578d87372a
MINOR: spoe: Add metrics in to know time spent in the SPOE

Following metrics are added for each event or group of messages processed in the
SPOE:

  * processing time: the delay to process the event or the group. From the
                     stream point of view, it is the latency added by the SPOE
                     processing.
  * request time : It is the encoding time. It includes ACLs processing, if
                   any. For fragmented frames, it is the sum of all fragments.
  * queue time : the delay before the request gets out the sending queue. For
                 fragmented frames, it is the sum of all fragments.
  * waiting time: the delay before the reponse is received. No fragmentation
                  supported here.
  * response time: the delay to process the response. No fragmentation supported
                   here.
  * total time: (unused for now). It is the sum of all events or groups
                processed by the SPOE for a specific threads.

Log messages has been updated. Before, only errors was logged (status_code !=
0). Now every processing is logged, following this format:

  SPOE: [AGENT] <TYPE:NAME> sid=STREAM-ID st=STATUC-CODE reqT/qT/wT/resT/pT

where:

  AGENT              is the agent name
  TYPE               is EVENT of GROUP
  NAME               is the event or the group name
  STREAM-ID          is an integer, the unique id of the stream
  STATUS_CODE        is the processing's status code
  reqT/qT/wT/resT/pT are delays descrive above

For all these delays, -1 means the processing was interrupted before the end. So
-1 for the queue time means the request was never dequeued. For fragmented
frames it is harder to know when the interruption happened.

For now, messages are logged using the same logger than the backend of the
stream which initiated the request.
doc/SPOE.txt
include/types/spoe.h
src/flt_spoe.c