On Thu, Jan 21, 2021 at 11:11:15AM +0100, William Dauchy wrote:
> On Thu, Jan 21, 2021 at 9:39 AM Willy Tarreau <w...@1wt.eu> wrote:
> > I didn't understand that it was a question. Well, as I mentioned previously,
> > we could have units stored in the stats structure so that the promex code
> > automatically performs the conversion. This would make everything more
> > homogenous I guess.
> 
> Do you mean we could rename the "MB" metrics instead of adding new
> ones? I added new ones as I did not know how to not break the existing
> `stats.c`, even though some transition could be needed at some point
> to avoid having those duplicates.

If we use two distinct names for promex and stats, and if we store the
multiple, we can indeed use the same metric and have prometheus emit the
value without the unit and without dividing it, using the appropriate
name. Sorry for not being more specific but I really don't know much the
promex part :-/

Willy

Reply via email to