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: fix validation error and metrics #3307

Merged
merged 2 commits into from
Feb 11, 2021
Merged

Loki: fix validation error and metrics #3307

merged 2 commits into from
Feb 11, 2021

Conversation

slim-bean
Copy link
Collaborator

Fix an issue where a label value containing a % character could lead to improper string substitution
Fix missing metrics for label validation failures.

…ded value manipulation if the value contains any valid golang printf substitute characters, e.g. %s
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cyriltovena cyriltovena merged commit 407afce into master Feb 11, 2021
@cyriltovena cyriltovena deleted the fix-validation branch February 11, 2021 12:52
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Feb 15, 2021
* Remove the helper functions for creating errors as they cause unintended value manipulation if the value contains any valid golang printf substitute characters, e.g. %s

* Improve error message for invalid labels, increment metrics for lines dropped for invalid labels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants