Commit 8cb197c5 authored by Tobias Schmidt's avatar Tobias Schmidt Committed by Brian Brazil

Improve readability of absent() documentation (#711)

This is just swapping two paragraphs and moves the explanation of the
example after the example itself.
parent 040c3a58
......@@ -18,12 +18,12 @@ their absolute value.
## `absent()`
`absent(v instant-vector)` returns an empty vector if the vector passed to it has any
elements and a 1-element vector with the value 1 if the vector passed to it has
no elements.
`absent(v instant-vector)` returns an empty vector if the vector passed to it
has any elements and a 1-element vector with the value 1 if the vector passed to
it has no elements.
In the second case, `absent()` tries to be smart about deriving labels of
the 1-element output vector from the input vector:
This is useful for alerting on when no time series exist for a given metric name
and label combination.
```
absent(nonexistent{job="myjob"})
......@@ -36,8 +36,8 @@ absent(sum(nonexistent{job="myjob"}))
# => {}
```
This is useful for alerting on when no time series
exist for a given metric name and label combination.
In the second example, `absent()` tries to be smart about deriving labels of the
1-element output vector from the input vector.
## `ceil()`
......
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