Signed-off-by: Levi Harrison <git@leviharrison.dev>
This commit is contained in:
Levi Harrison 2021-08-25 07:58:30 -04:00
parent f5c6ee4df6
commit be6ce7bcc2

View File

@ -40,6 +40,16 @@ grouping labels becoming the output label set. The metric name is dropped. Entri
for which no matching entry in the right-hand vector can be found are not part of for which no matching entry in the right-hand vector can be found are not part of
the result. the result.
### Trigonometric binary operators
The following trigonometric binary operators exist in Prometheus:
* `atan2` (https://pkg.go.dev/math#Atan2, _This is experimental_)
Trigonometric operators allow trigonometric functions to be executed on two vectors using
vector matching, which isn't available with normal functions. They act in the same manner
as arithmetic operators.
### Comparison binary operators ### Comparison binary operators
The following binary comparison operators exist in Prometheus: The following binary comparison operators exist in Prometheus:
@ -264,7 +274,7 @@ The following list shows the precedence of binary operators in Prometheus, from
highest to lowest. highest to lowest.
1. `^` 1. `^`
2. `*`, `/`, `%` 2. `*`, `/`, `%`, `atan2`
3. `+`, `-` 3. `+`, `-`
4. `==`, `!=`, `<=`, `<`, `>=`, `>` 4. `==`, `!=`, `<=`, `<`, `>=`, `>`
5. `and`, `unless` 5. `and`, `unless`