]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: sample: make RQ/RS stats available everywhere
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Apr 2026 16:34:35 +0000 (18:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Apr 2026 06:01:07 +0000 (08:01 +0200)
Sample fetch functions working on the request/response stats were marked
as being only compatible with the log phase. This is a mistake because
by definitions, stats can be consulted anywhere from the moment they
start to appear. It's only that they are valid as far as the logs. At the
moment, no sample fetch function depends on RQFIN, and only res.timer.data
depends on RSFIN. But this will be needed to relax certain sample fetch
functions (and will need to be backported along with a few other patches).

src/sample.c

index a1e1c74aef6a25733f91e728fbb5e199d2530f6f..bc9dadff4fa541d2df248fc528edd18e95bd3f29 100644 (file)
@@ -266,39 +266,39 @@ const unsigned int fetch_cap[SMP_SRC_ENTRIES] = {
                           SMP_VAL___________ | SMP_VAL_BE_CHK_RUL | SMP_VAL___________ |
                           SMP_VAL___________ ),
 
-       [SMP_SRC_RQFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
+       [SMP_SRC_RQFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL_FE_REQ_CNT |
+                          SMP_VAL_FE_HRQ_HDR | SMP_VAL_FE_HRQ_BDY | SMP_VAL_FE_SET_BCK |
+                          SMP_VAL_BE_REQ_CNT | SMP_VAL_BE_HRQ_HDR | SMP_VAL_BE_HRQ_BDY |
+                          SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT |
+                          SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL |
+                          SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY |
                           SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ |
                           SMP_VAL___________ ),
 
        [SMP_SRC_RSFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
                           SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
                           SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
+                          SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT |
+                          SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL |
+                          SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY |
                           SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ |
                           SMP_VAL___________ ),
 
-       [SMP_SRC_TXFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
+       [SMP_SRC_TXFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL_FE_REQ_CNT |
+                          SMP_VAL_FE_HRQ_HDR | SMP_VAL_FE_HRQ_BDY | SMP_VAL_FE_SET_BCK |
+                          SMP_VAL_BE_REQ_CNT | SMP_VAL_BE_HRQ_HDR | SMP_VAL_BE_HRQ_BDY |
+                          SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT |
+                          SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL |
+                          SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY |
                           SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ |
                           SMP_VAL___________ ),
 
-       [SMP_SRC_SSFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
-                          SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ |
+       [SMP_SRC_SSFIN] = (SMP_VAL_FE_CON_ACC | SMP_VAL_FE_SES_ACC | SMP_VAL_FE_REQ_CNT |
+                          SMP_VAL_FE_HRQ_HDR | SMP_VAL_FE_HRQ_BDY | SMP_VAL_FE_SET_BCK |
+                          SMP_VAL_BE_REQ_CNT | SMP_VAL_BE_HRQ_HDR | SMP_VAL_BE_HRQ_BDY |
+                          SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT |
+                          SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL |
+                          SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY |
                           SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ |
                           SMP_VAL___________ ),
 };