Skip to content

Commit

Permalink
Add precision about the range notation for LogQL. (#1881)
Browse files Browse the repository at this point in the history
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
  • Loading branch information
cyriltovena authored Apr 1, 2020
1 parent 43ef2d8 commit 82a0b9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/logql.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ aggregation syntax, including filter expressions. This example gets the
per-second rate of all non-timeout errors within the last ten seconds for the
MySQL job.

It should be noted that the range notation `[5m]` can be placed at end of the log stream filter or right after the log stream matcher. For example those two syntaxes below are equivalent.

```logql
rate({job="mysql"} |= "error" != "timeout" [5m])
rate({job="mysql"}[5m] |= "error" != "timeout")
```

### Aggregation operators

Like [PromQL](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators),
Expand Down

0 comments on commit 82a0b9a

Please sign in to comment.