Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple comma-separated function arguments #7

Closed
ocervell opened this issue Apr 26, 2021 · 3 comments
Closed

Multiple comma-separated function arguments #7

ocervell opened this issue Apr 26, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ocervell
Copy link

Found another small issue with the following query:

histogram_quantile(0.9999,sum(irate(metric_histogram{a=~'(1|2|3)',b=~'(1|2|3)',c=~'(1|2|3)',d=~'(1|2|3)'}[1m])) by(a,b,c))

Screenshot 2021-04-26 at 10 37 52

seems that multiple labels from by aggregator are not parsed properly.

@pabluk
Copy link
Owner

pabluk commented Apr 27, 2021

Hey @ocervell! thanks for the full query, I'm testing it now and I'll try to find what is happening with those labels.

@pabluk pabluk added the bug Something isn't working label Apr 27, 2021
@pabluk pabluk self-assigned this Apr 27, 2021
@pabluk pabluk closed this as completed in 53ab9ce Apr 27, 2021
@pabluk
Copy link
Owner

pabluk commented Apr 27, 2021

I figured out the issue here and I merged this fix #8.
Now, the output for that expression is formatted properly using:

pygmentize -f png -O "line_numbers=False,style=monokai" -o example.png example.promql

example

@pabluk
Copy link
Owner

pabluk commented Apr 27, 2021

The new release 0.0.7 is now available on PyPI https://pypi.org/project/pygments-promql/

Thanks again @ocervell for helping to improve this lexer and please don't hesitate to share any future issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants