mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-30 14:31:08 +01:00
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.