]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tevt: Add the termination events log's fundations
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Dec 2024 09:43:54 +0000 (10:43 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 31 Jan 2025 09:41:49 +0000 (10:41 +0100)
commite9449449908604c814004a617d9fd7d17bb7e0c1
treea8a904d1e6886f10212c03c8bc22c3be1773127b
parent4ccca7efcfd36281827e686f524e12331b0a67e2
MINOR: tevt: Add the termination events log's fundations

Termination events logs will be used to report the events that led to close
a connection. Unlike flags, that reflect a state, the idea here is to store
a log to preserve the order of the events. Most of time, when debugging an
issue, the order of the events is crucial to be able to understand the root
cause of the issue. The traces are trully heplful to do so. But it is not
always possible to active them because it is pretty verbose. On heavily
loaded platforms, it is not acceptable. We hope that the termination events
logs will help us in that situations.

One termination events log will be be store at each layer (connection, mux
connection, mux stream...) as a 32-bits integer. Each event will be store on
8 bits, 4 bits for the location and 4 bits for the type. So the first four
events will be stored only for each layer. It should be enough why a
connection is closed.

In this patch, the enums defining the termination event locations and types
are added. The macro to report a new event is also added and a function to
convert a termination events log to a string that could be display in log
messages for instance.
include/haproxy/connection-t.h
include/haproxy/connection.h
src/connection.c
src/raw_sock.c
src/sock.c
src/ssl_sock.c