Argus
Argus copied to clipboard
Prettify button on view metrics page changes query
REPRO STEPS:
- Navigate to the Argus viewmetrics page
- Paste in the following to the text input box
GROUPBY(-15m:-2m:foo.bar.-.-:some.metric.*.here{tag=baz}:avg:3m-avg, #(someRegexForGrouping)#, #SUM#)
- Click the Prettify button
EXPECTED: The query entered should be formatted without changing the actual text of the query
GROUPBY(
-15m:-2m:foo.bar.-.-:some.metric.*.here{tag=baz}:avg:3m-avg,
#(someRegexForGrouping)#,
#SUM#
)
ACTUAL: The prettified version of the query has an extra comma between the closing parenthesis of the regex field and the # symbol.
GROUPBY(
-15m:-2m:foo.bar.-.-:some.metric.*.here{tag=baz}:avg:3m-avg,#(
someRegexForGrouping
),
#,#SUM#
)
Yes, this happens when parentheses are included in regex. Let me confirm with my team if regex in expression supports characters like brackets or commas.