Occasionally I’m having an inconsistent log count number
I want to get log count from time A to time B, with following two ways
case1:
- run range query from A to B and get result count (all logs returned, no dup)
case2:
- use count_over_time run an instant query for past (B-A) at time B
Not sure why this can happen? Can anyone help?
Does your instance query have the same interval as the entirety of of the range from query 1? Can you share your queries please?
Sry have to hide some info in query but the filter part is exactly the same. Thanks for the help!
As you can see the count_over_time result is 51 but actually the log lines are 25 returned in this minute
I just checked our Loki instance and I am not seeing this issue.
3:30:00 to 3:31:00 is actually 1 minute and 1 second, not sure if that impacts your number or not.