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

[loki] Json|Logfmt Parser returns empty label value if it contains symbol #13963

Closed
vlad-diachenko opened this issue Aug 26, 2024 · 2 comments · Fixed by #14068
Closed

[loki] Json|Logfmt Parser returns empty label value if it contains symbol #13963

vlad-diachenko opened this issue Aug 26, 2024 · 2 comments · Fixed by #14068
Labels
area/logql component/logql component/loki good first issue These are great first issues. If you are looking for a place to start, start here! type/enhancement Something existing could be improved

Comments

@vlad-diachenko
Copy link
Contributor

Describe the bug

When the Logfmt or JSON parser meets the symbol inside the label value, it skips the whole label or replaces the value with an empty string.

Loki drops the value(here and here) because PromQL engine fails the query if it meets such symbols.

To Reproduce
Open LogQL analyzer page and run the query:

  1. Logfmt example
image
  1. JSON example
image

Expected behavior
Label value must be replaced with (symbol: space) instead of dropping the label or label value.

Environment:

  • Infrastructure: any
  • Deployment tool: any
@vlad-diachenko vlad-diachenko added component/loki good first issue These are great first issues. If you are looking for a place to start, start here! type/enhancement Something existing could be improved component/logql area/logql labels Aug 26, 2024
@grafana grafana deleted a comment from Lxx-c Aug 26, 2024
@Manish-Giri
Copy link

Hi, if this is open for contributions, can I give it a shot?

@vlad-diachenko
Copy link
Contributor Author

Hi, if this is open for contributions, can I give it a shot?

Hey, @Manish-Giri . Sure, the help is more than appreciated!
Do you now when you can provide a fix? just to understand ETA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logql component/logql component/loki good first issue These are great first issues. If you are looking for a place to start, start here! type/enhancement Something existing could be improved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@Manish-Giri @vlad-diachenko and others