]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Register a dedicated trace source for the filters
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 19 Nov 2026 12:53:19 +0000 (13:53 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Nov 2026 13:31:50 +0000 (14:31 +0100)
commit0ddd6a4b278a9af2be0c219226475eabe2545efe
treed5b23e6e06273ef12a07db2e7e9b6673e3c4241a
parent785b1576213f39416abd48c4316747eac0387c5e
MINOR: filters: Register a dedicated trace source for the filters

The filters were traced using the stream trace source, with the
STRM_EV_FLT_ANA and STRM_EV_FLT_ERR events. It was convenient but it
mixed the filters with the stream analysers, and the events were not
detailed enough to know which filter callback was called, nor on which
channel.

Now a dedicated "filter" trace source is registered. The first argument is
always the stream, the second one is the filter instance and the third one
is the channel, so that the lock-on may be performed on a specific filter.
The events are split by callback: start_ana, pre_ana, post_ana, end_ana,
http_hdrs, http_payload, http_end, http_reset, http_reply, tcp_payload and
xfer_data. Two other events are reported when a filter is attached to or
detached from a stream. The wait and err events are reported when the
filter analysis is paused waiting for data or when it fails.

The decoding function reports the stream and the channel states, the
filter id and its flags, the filter offsets, and the channels' buffers
when the verbosity is high enough. This way it is possible to follow a
filter instance through the analysis of a request or a response, which was
not possible with the stream trace source alone.

The STRM_EV_FLT_ANA and STRM_EV_FLT_ERR events are removed, along with
their entries in the stream trace source, since they are not used
anymore.
include/haproxy/stream.h
src/filters.c
src/stream.c