loki
loki copied to clipboard
fix(stats_collector): Do not collect stats for failed requests.
Signed-off-by: Kaviraj [email protected]
What this PR does / why we need it: When any type of query fails, do not collect statistics. Rationale being when core http handler returns error, it's reponse will be nil and there won't be any statistics to collect and log.
Which issue(s) this PR fixes: Fixes #6231
Special notes for your reviewer:
Checklist
- [ ] Documentation added
- [x] Tests updated
- [ ] Is this an important fix or new feature? Add an entry in the
CHANGELOG.md
. - [ ] Changes that require user attention or interaction to upgrade are documented in
docs/sources/upgrading/_index.md
./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki
Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.
+ ingester 0%
+ distributor 0%
+ querier 0%
+ querier/queryrange 0%
+ iter 0%
+ storage 0%
+ chunkenc 0%
+ logql 0%
+ loki 0%
Hello there! As per my comment in #6231, this appears to still be happening. Any idea what it could be about?
@kavirajk Could you put this change in changelog.md? In order to have the tracking of which release this fix was/will be implemented.