From be6ce7bcc210df78043071ffc38a3612a000b1bd Mon Sep 17 00:00:00 2001 From: Levi Harrison Date: Wed, 25 Aug 2021 07:58:30 -0400 Subject: [PATCH] Add docs Signed-off-by: Levi Harrison --- docs/querying/operators.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/querying/operators.md b/docs/querying/operators.md index d998d7326..b790ed1da 100644 --- a/docs/querying/operators.md +++ b/docs/querying/operators.md @@ -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 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 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. 1. `^` -2. `*`, `/`, `%` +2. `*`, `/`, `%`, `atan2` 3. `+`, `-` 4. `==`, `!=`, `<=`, `<`, `>=`, `>` 5. `and`, `unless`