-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix(logql): Make LabelSampleExtractor
work as expected when label doesn't exist in logline
#6766
Merged
Commits on Jul 25, 2022
-
fix(logql): Make
StringLabelfilter
work as expectedConsider Log lines ``` msg=hello subqueries=5 msg=hello subqueries=0 msg=hello ``` If you run following logql ``` {foo="bar"}|logfmt|subqueries!=0 ``` it returns ``` msg=hello subqueries=5 ``` But if you run following logql ``` {foo="bar"}|logfmt|subqueries!="0" # NOTE: "0" as string. ``` it returns ``` msg=hello subqueries=5 msg=hello ``` NOTE: it also returns log lines that doesn't contain `subqueries` label in the first place. This cause subtle error if used in metric queries using that `label` in unwrap. e.g: following logql on above log lines returns ``` sum_over_time({foo="bar"}|logfmt|subqueries!="0"|unwrap subqueries[1m]) ``` Returns `pipeline error: 'SampleExtractionErr'`. Because, the lines without `subqueries` labels are not skipped during `ProcessLine` and during metric extraction, our extractor sets this `SampleExtractionerror`. Fixes: #6713
Configuration menu - View commit details
-
Copy full SHA for d0fbf3c - Browse repository at this point
Copy the full SHA d0fbf3cView commit details -
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a83da68 - Browse repository at this point
Copy the full SHA a83da68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8120941 - Browse repository at this point
Copy the full SHA 8120941View commit details
Commits on Jul 27, 2022
-
Add more tests and fix the edge case with equality to empty strings
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bab6ca0 - Browse repository at this point
Copy the full SHA bab6ca0View commit details -
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a50c635 - Browse repository at this point
Copy the full SHA a50c635View commit details
Commits on Aug 1, 2022
-
handle this edge case during metric extraction. Not in label filter
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 40c5953 - Browse repository at this point
Copy the full SHA 40c5953View commit details -
Configuration menu - View commit details
-
Copy full SHA for b915271 - Browse repository at this point
Copy the full SHA b915271View commit details -
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b24112a - Browse repository at this point
Copy the full SHA b24112aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6568360 - Browse repository at this point
Copy the full SHA 6568360View commit details
Commits on Aug 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2f9b01e - Browse repository at this point
Copy the full SHA 2f9b01eView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.