prometheus/model
Bryan Boreham 0289dd6157 relabel: blank replacement deletes label post-regexp
If `cfg.TargetLabel` is a template like `$1`, it won't match any labels,
so no point calling `lb.Del` with it.

Similarly if `target` is not a valid label name, it won't match any
labels, so don't call with that either.

The intention seems to have been that a blank _value_ would delete the
target, so change that code to use `target` instead of `cfg.TargetLabel`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-12-18 16:39:01 +00:00
..
exemplar Scraping: use slices.sort for exemplars 2023-11-24 14:42:26 +00:00
histogram Merge branch 'main' into arve/typos 2023-12-12 12:02:03 +01:00
labels labels: extract common code between slice and stringlabels 2023-11-17 18:20:03 +00:00
metadata Introduce TSDB changes for appending metadata to the WAL (#10972) 2022-07-19 10:58:52 +02:00
relabel relabel: blank replacement deletes label post-regexp 2023-12-18 16:39:01 +00:00
rulefmt golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
textparse Append Created Timestamps (#12733) 2023-12-11 08:43:42 +00:00
timestamp
value