-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Missing log lines when using json parser and label filter on a loki data source #3345
Comments
Hello @wallrj, would you mind sharing with us response from query inspector to see if problem is on grafana's side or loki's. Also, it doesn't seem to be related to this issue, but in 7.4.0 release we have removed redundant deduplication of logs which was sometimes cause of not showing all received logs. However, this was related to the logs that have the same content and same nanoseconds timestamp, which isn't your case. |
Thanks for investigating @ivanahuckova Here's the query inspector output, with and without the Without json filter - 3 log linesQuery: Response:
With json filter - 1 log lineQuery: Response:
|
@wallrj thanks for sharing this! I have transferred this to |
Hey @wallrj, Do you see this issue for anything else than fresh data ? Or this mostly happening when querying recent data ? Can reproduce this over and over ? Trying to gather more information to pinpoint the issue. |
Hi @cyriltovena Thanks for investigating.
It seems to only be when querying recent data. And also worth noting that the three log events showed up in the loki based graphs, even for recent data, and those also use the Let me know if you need any other info. |
I'm chasing this one, I think it's a duplicate of #3208. |
I think I'm running into a similar issue, I feel like I'm losing my mind. I have JSON data going into Loki, and sometimes when I query it, not all the lines show up. If I fiddle with my selectors, and wait for a bit, it seems to fix itself, and the missing lines reappear. It seems to be more based on the time than anything, since after they reappear, the original query works. I'm on Grafana Cloud (7.4.3 currently), it's a very hard thing to pin down, but it's definitely happening |
@loganmc10 @wallrj A fix is on its way, finally found it. Thank you for your patience. |
For backward queries, since LogQL parser we are using a heapIterator in the headchunk to re-order properly entries. But we also reverse all iterators in the memchunk code, even the headchunk which causes reversal of already reversed entries. This PR skips reversal of the headchunk. Fixes grafana#3345 Fixes grafana#3208 This has for side effects: - when using replication you would not dedupe data properly anymore, since the data is not correctly ordered accross batches. - when using limit it would miss entries. Signed-off-by: Cyril Tovena <[email protected]>
* Fixes head chunk iterator direction. For backward queries, since LogQL parser we are using a heapIterator in the headchunk to re-order properly entries. But we also reverse all iterators in the memchunk code, even the headchunk which causes reversal of already reversed entries. This PR skips reversal of the headchunk. Fixes #3345 Fixes #3208 This has for side effects: - when using replication you would not dedupe data properly anymore, since the data is not correctly ordered accross batches. - when using limit it would miss entries. Signed-off-by: Cyril Tovena <[email protected]> * Fix reversal and time filtering of headchunk. Signed-off-by: Cyril Tovena <[email protected]>
I (sometimes) notice that when I add a matching filter to a loki log query, matching log lines are not shown in the results.
When I remove the filter, all the log lines are shown.
With filter
Without filter
I expected all three log lines to be shown in both these queries.
I have sometimes noted that simply adding the
json
processor to the pipeline results in log lines missing from the results.The newest line is the one that remains.
Environment:
Grafana Cloud: Grafana v7.3.7 (1e261642f4)
The text was updated successfully, but these errors were encountered: