Commit e0d6bee2 authored by Julius Volz's avatar Julius Volz Committed by Julius Volz

Document binary operator precedence.

parent fca980fb
...@@ -189,3 +189,17 @@ If we are just interested in the total of HTTP requests we have seen in **all** ...@@ -189,3 +189,17 @@ If we are just interested in the total of HTTP requests we have seen in **all**
applications, we could simply write: applications, we could simply write:
sum(http_requests_total) sum(http_requests_total)
## Binary operator precedence
The following list shows the precedence of binary operators in Prometheus, from
lowest to highest.
1. `OR`
2. `AND`
3. `==`, `!=`, `<=`, `<`, `>=`, `>`
4. `+`, `-`
5. `*`, `/`, `%`
Operators on the same precedence level are left-associative. For example,
`2 * 3 % 2` is equivalent to `(2 * 3) % 2`.
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