I'm not good in reading comments

чт, 12 февр. 2026 г. в 16:57, Willy Tarreau <[email protected]>:

> Hi Ilya,
>
> On Sat, Feb 07, 2026 at 07:58:27PM +0100, Ilia Shipitsin wrote:
> > if haproxy is built, for example, with slz, no need to add an overhead
> > of those metrics
> >
> > battle tested
> > ---
> >  include/haproxy/stats-t.h | 2 ++
> >  src/stats.c               | 2 ++
> >  2 files changed, 4 insertions(+)
> >
> > diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h
> > index 1ca0621da..8aa57162e 100644
> > --- a/include/haproxy/stats-t.h
> > +++ b/include/haproxy/stats-t.h
> > @@ -303,8 +303,10 @@ enum stat_idx_info {
> >       ST_I_INF_COMPRESS_BPS_IN,
> >       ST_I_INF_COMPRESS_BPS_OUT,
> >       ST_I_INF_COMPRESS_BPS_RATE_LIM,
> > +#ifdef USE_ZLIB
> >       ST_I_INF_ZLIB_MEM_USAGE,
> >       ST_I_INF_MAX_ZLIB_MEM_USAGE,
> > +#endif
>
> Please do not change numberring of stats nor info fields, their position
> is stable across versions and corresponds to the ID you can see in
> "show stats typed" (and some people just use the line number as an SNMP
> entry). That's why the comment above the enum says "Please only append
> at the end, before the ST_I_INF_MAX entry, and never insert anything in
> the middle nor at the beginning", actually it implicitly also means that
> one must not remove any fields from there.
>
> If something absolutely needs to be one, I guess it might be possible to
> play with the .alt_name field in the stats_col_info[] that's used by
> prometheus, and which would cause the entry not to be reported there,
> but I doubt that the benefit is worth the maintenance hassle (and I
> don't know if it's desirable by users to silently skip some fields).
>
> Thanks,
> Willy
>

Reply via email to