-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 /loki/api/v1/label/<name>/values : query paramer not respected #10993
Comments
Additional information: The five entries listed above are pushed at 18:33. Querying labels works perfectly fine at the beginning, returning just the exact number of entries per type
Then the logs produce the following messages:
After this, the queries fail, returning now all entries, independent of the stream selector, returning 5 entries for each type, independent of the type. Note that the issue starts happening at 19:03, around 30 minutes after the initial push. |
The error is not such. It is needed to use as well the start or since parameters in the query, and the right results are returned properly. |
I will just create a separate issue for this documentation issue. |
After additional tests, including since or start, or any combinations with end, still fail to produce the right results. Reopening issue... |
@coderazzi Probably a duplicate isssue for #10759 and the fix is currently only in main. @JoaoBraveCoding provided backports that await review/approval by the maintainers. |
@periklis I agree with the duplicate suggestion. |
Ok closing then. |
Describe the bug
Using HTTP API interface, querying for labels with a stream selector produces the same result as no selector used
To Reproduce
Steps to reproduce the behavior:
curl -G http://localhost:3100/loki/api/v1/label/idn/values --data-urlencode 'query={type="Result"}'
Expected behavior
Only one item should be returned.
This happens in fact on the first tries. But after a while, the response contains all five entries.
Restarting Loki doesn't help.
Creating a query with invalid stream selector (selector or value) also produces the five entries:
curl -G http://localhost:3100/loki/api/v1/label/idn/values --data-urlencode 'query={typeINVALID="Result"}'
Doing
curl -G http://localhost:3100/loki/api/v1/label/typeINVALID/values
succeeds, but returns nothing, as expected
Note that Grafana shows the entries properly. Doing a query using the respective stream selectors only produce the desired results
Environment:
Screenshots, Promtail config, or terminal output
The logs are pushed manually
The text was updated successfully, but these errors were encountered: