-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Loki: Add unpack query builder hint
#65608
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
Conversation
|
We should also suggest it in Monaco, correct? Like we do with detected parsers. |
matyax
left a comment
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.
Looks good!
| const lineField = frame.fields.find((field) => field.type === FieldType.string); | ||
| if (lineField == null) { | ||
| return { hasJSON: false, hasLogfmt: false }; | ||
| return { hasJSON: false, hasLogfmt: false, hasPack: false }; |
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.
Nice!
|
You have successfully added a new CodeQL configuration |
Added in 1bb559a. Let me know if I miss anything! |
This is coming from a customer call we had earlier and we (@ivanahuckova) quickly aligned on not showing JSON parser if we think log lines are packed. Might be a bit misleading, because all packed lines are JSON. |
matyax
left a comment
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.
👌
|
Backend code coverage report for PR #65608 |
|
Frontend code coverage report for PR #65608
|

What is this feature?
This PR adds hints if users have log lines that are in a
packedformat. Those lines come from thepackstage at ingestion: https://grafana.com/docs/loki/latest/clients/promtail/stages/pack/Special notes for your reviewer:
make devenv sources=loki)placeas label key andmoonas value.unpackparser being suggested.