Re: [prometheus-developers] PromQL formatting/prettifying support in promtool

2020-07-06 Thread Harkishen Singh
With some discussions in the design docs with brian, it stills feels like a confusion that, do we want to split labels_matchers in vector_selector that are immediate child nodes to any binary expression? On Wednesday, June 24, 2020 at 9:43:00 PM UTC+5:30 Harkishen Singh wrote: > After

Re: [prometheus-developers] PromQL formatting/prettifying support in promtool

2020-06-24 Thread Harkishen Singh
After discussions, I have updated the document with most of the comments addressed (except the ones that are in conflict). The whitespace issue is covered and is consistent now. A *note* section has been added to give a prior knowledge on the formatting on which the document is based. Please

Re: [prometheus-developers] PromQL formatting/prettifying support in promtool

2020-06-23 Thread Brian Brazil
On Tue, 23 Jun 2020 at 22:19, Julius Volz wrote: > On Tue, Jun 23, 2020 at 9:47 AM Ben Kochie wrote: > >> One subject that I don't see covered in the doc is spacing. There are >> several places where whitespace is optional, and it would be good to have a >> consistent opinion on it. >> >> *

Re: [prometheus-developers] PromQL formatting/prettifying support in promtool

2020-06-23 Thread Julius Volz
On Tue, Jun 23, 2020 at 9:47 AM Ben Kochie wrote: > One subject that I don't see covered in the doc is spacing. There are > several places where whitespace is optional, and it would be good to have a > consistent opinion on it. > > * Between label selectors {foo="foo",bar="bar"} vs {foo="foo",

Re: [prometheus-developers] PromQL formatting/prettifying support in promtool

2020-06-23 Thread Ben Kochie
One subject that I don't see covered in the doc is spacing. There are several places where whitespace is optional, and it would be good to have a consistent opinion on it. * Between label selectors {foo="foo",bar="bar"} vs {foo="foo", bar="bar"} * Between params: histogram_quantile(0.9,

Re: [prometheus-developers] PromQL formatting/prettifying support in promtool

2020-06-20 Thread Tobias Schmidt
Thanks a lot for your great work! Expression formatting will likely require dozens of detailed rules in order to get things consistent, and style discussions are the perfect case for bikeshedding. I really appreciate your efforts and can't wait for a `promtool fmt` on-save editor integration. The

[prometheus-developers] PromQL formatting/prettifying support in promtool

2020-06-19 Thread Harkishen Singh
Hello everyone! As part of the GSoC 2020, I am working on designing a Promql expression formatting/prettifying tool whose support will be as an extension in the current promtool. A design document related to the same has been made and it would be great for some comments/views/suggestions, etc.