-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
LogQL: Pattern Parser #3837
LogQL: Pattern Parser #3837
Conversation
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Reworking ast to works with bytes and not runes. Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left a few grammatical nits.
Didn't spot a test here for a duplicate matcher (i.e. <user> <user>
) - did I miss it?
Good point @dannykopping I think we need that check ! |
Signed-off-by: Cyril Tovena <[email protected]>
Co-authored-by: Danny Kopping <[email protected]>
Co-authored-by: Danny Kopping <[email protected]>
Ho in fact it's there already https://github.com/cyriltovena/loki/blob/token/pkg/logql/log/pattern/ast.go#L38 |
Signed-off-by: Cyril Tovena <[email protected]>
Co-authored-by: Danny Kopping <[email protected]>
It's checking for it, but is there a test that explicitly exercises that? |
https://github.com/cyriltovena/loki/blob/token/pkg/logql/log/pattern/pattern_test.go#L155 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made suggestions on the documentation portion of this PR. The documentation will be good to go with suggested changes. What a nice parsing addition!
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Co-authored-by: Karen Miller <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
Hi, I'm sorry but is this parser already released?, the documentation on LogQL already have this mentioned and I have Loki version 2.2.1 (the latest one, AFAIK) but I can't use this parser yet |
Hi @rbudiharso - the feature is not yet released; it'll be included in the upcoming v2.3 release. The feature is available for use if you build from Apologies for the confusion! |
Hi @dannykopping, do we have an approximate release date for v2.3? I presume/hope will be deployed to Grafana Cloud shortly thereafter? |
What this PR does / why we need it:
This PR adds a new parser that is easier to use than the regexp one. See design docs https://docs.google.com/document/d/135OltV_nJgLgryzRhEn5ULgcbwl5bDB6i79IOzMp8IQ/edit
In term of performance it seems to be the fastest parser right now.
Special notes for your reviewer:
See tests for example of usages.
Checklist