VictoriaMetrics/lib/promrelabel
Zakhar Bessarab 15b1810dc8
lib/promrelabel: fix relabeling if clause (#4816)
* lib/promrelabel: fix relabeling if clause being applied to labels outside of current context

Relabeling is applied to each metric row separately, but in order to lower amount of memory allocations it is reusing labels.

Functions which are working on current metric row labels are supposed to use only current metric labels by using provided offset, but if clause matcher was using the whole labels set instead of local metrics.

This leaded to invalid relabeling results such as one described here: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4806

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* docs/CHANGELOG.md: document the bugfix

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1998
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4806

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-08-11 06:44:46 -07:00
..
testdata lib/promrelabel: add support for keepequal and dropequal relabeling actions 2022-12-21 20:06:09 -08:00
config_test.go lib/promrelabel: make fmt after d3de110070 2022-12-21 20:25:37 -08:00
config.go lib/promrelabel: add support for keepequal and dropequal relabeling actions 2022-12-21 20:06:09 -08:00
debug.go Revert "lib/promrelabel: show error message if labels not in prometheus exposition format (#4304)" 2023-05-12 17:01:23 -07:00
debug.qtpl lib/promrelabel: use monospace font at textarea for writing relabel configs on /metric-relabel-debug and /target-relabel-debug pages 2023-05-18 20:49:47 -07:00
debug.qtpl.go lib/promrelabel: use monospace font at textarea for writing relabel configs on /metric-relabel-debug and /target-relabel-debug pages 2023-05-18 20:49:47 -07:00
graphite_test.go lib/promrelabel: support action: graphite relabeling 2022-06-16 20:25:49 +03:00
graphite_timing_test.go lib/promrelabel: support action: graphite relabeling 2022-06-16 20:25:49 +03:00
graphite.go app,lib: fix typos in comments (#3804) 2023-02-13 09:32:35 -08:00
if_expression_test.go lib/promrelabel: add support for a list of series selectors at IfExpression 2023-07-24 17:09:59 -07:00
if_expression.go lib/promrelabel: return correct string representation for IfExpression containing a single selector 2023-07-24 19:33:04 -07:00
relabel_test.go lib/promrelabel: fix relabeling if clause (#4816) 2023-08-11 06:44:46 -07:00
relabel_timing_test.go lib/promscrape: implement target-level and metric-level relabel debugging 2022-12-10 02:25:56 -08:00
relabel.go lib/promrelabel: fix relabeling if clause (#4816) 2023-08-11 06:44:46 -07:00
scrape_url_test.go lib/promrelabel: make target url from labels on target relabel page (#3882) 2023-03-20 22:08:39 -07:00
scrape_url.go lib/promrelabel: make target url from labels on target relabel page (#3882) 2023-03-20 22:08:39 -07:00