Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upImprovement: Ignore beginning comma in query selectors #2676
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JensRantil commentedMay 4, 2017
Background: When I (in the Prometheus web GUI) query metrics, I generally first query for a list of all metrics and then copy-paste some selectors to refine my query.
Problem: Copy-pasting many times mistakenly includes a beginning comma (
,).my_metric{instance="my-instance",}is gracefully handled by Prometheus butmy_metric{,instance="my-instance"}is not and yieldsError executing query: parse error at char 11: unexpected "," in label matching, expected identifier.Proposed solution: That
my_metric{,instance="my-instance"}is interpreted asmy_metric{instance="my-instance"}and Prometheus is a bit more forgiving :-)