Commit b555789b authored by beorn7's avatar beorn7

Fix `label_replace` documentation

With the fix in place, the documentation is in line with the intention
expressed by tests,
e.g. https://github.com/prometheus/prometheus/blob/master/promql/testdata/functions.test#L173-L176
and
https://github.com/prometheus/prometheus/blob/master/promql/testdata/functions.test#L195-L199
.
parent 05eea034
......@@ -248,8 +248,7 @@ src_label string, regex string)` matches the regular expression `regex` against
the label `src_label`. If it matches, then the timeseries is returned with the
label `dst_label` replaced by the expansion of `replacement`. `$1` is replaced
with the first matching subgroup, `$2` with the second etc. If the regular
expression doesn't match then the timeseries is not returned.
expression doesn't match then the timeseries is returned unchanged.
This example will return a vector with each time series having a `foo`
label with the value `a` added to it:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment