mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
Now the stat_cols_info array contains all info that prometheus requires, stop using the promex_global_metrics array that contains redundant infos. Initial goal was to completely drop the promex_global_metrics array. However it was deemed no longer relevant as prometheus stats rely on a custom name that cannot be derived from stat_cols_info[], unless we add a specific ".promex_name" field or similar to name the stats for prometheus. This is what was carried over on a first attempt but it proved to burden stat_cols_info[] array (not only memory wise, it is quite confusing to see promex in the main codebase, given that prometheus is shipped as an optional add-on). The new strategy consists in revamping the promex_global_metrics array from promex_metric (with all redundant fields for metrics) to a simple ID<==>IST mapping. If the metric is mapped, then it means promex addon should advertise it (using the name provided in the mapping). Now for all the metric retrieval, no longer rely on built-in hardcoded values but instead leverage the new stat cols API. The tricky part is the .type association because the general rule doesn't apply for all metrics as it seems that we stated that some non-counters oriented metrics (at least from haproxy point of view) had to be presented as counter metrics. So in this patch we add some special treatment for those metrics to emulate the old behavior. If that's not relevant in the future, it may be removed. But this requires to ensure that promex users will properly cope with that change. At least for now, no change of behavior should be expected. |
||
|---|---|---|
| .. | ||
| 51degrees | ||
| deviceatlas | ||
| ot | ||
| promex | ||
| wurfl | ||