From 1e0cd28bf6d1168f3636e7a9e113f26f2496e02b Mon Sep 17 00:00:00 2001 From: Tobias Guggenmos Date: Fri, 20 Dec 2019 12:28:56 +0100 Subject: [PATCH] PromQL: Support trailing commas in grouping opts (#6480) * PromQL: Support trailing commas in grouping opts Fixes #6470 Signed-off-by: Tobias Guggenmos --- docs/querying/basics.md | 4 +- docs/querying/operators.md | 9 ++- promql/generated_parser.y | 2 + promql/generated_parser.y.go | 107 +++++++++++++++++++---------------- promql/parse_test.go | 32 +++++++++++ 5 files changed, 101 insertions(+), 53 deletions(-) diff --git a/docs/querying/basics.md b/docs/querying/basics.md index 4021a6580b..0b1bc09552 100644 --- a/docs/querying/basics.md +++ b/docs/querying/basics.md @@ -74,8 +74,8 @@ name: http_requests_total -It is possible to filter these time series further by appending a set of labels -to match in curly braces (`{}`). +It is possible to filter these time series further by appending a comma separated list of label +matchers in curly braces (`{}`). This example selects only those time series with the `http_requests_total` metric name that also have the `job` label set to `prometheus` and their diff --git a/docs/querying/operators.md b/docs/querying/operators.md index 99143ec8a1..757037276e 100644 --- a/docs/querying/operators.md +++ b/docs/querying/operators.md @@ -205,12 +205,17 @@ or ([parameter,] ) [without|by (