Skip to content
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-Canary: Add query spot checking and metric count checking #2344

Merged
merged 10 commits into from
Jul 13, 2020

Conversation

slim-bean
Copy link
Collaborator

The current canary implementation has been expanded to take a sample of entries created and query for them over time at a regular interval.

This should better exercise querying data as it moves from inmemory in ingesters to chunk storage to make sure data is consistently returned.

Additionally a metric query is run to count the logs over a period of time, this is helpful to exercise the Loki metrics query path as well as another sanity check that log data is being stored and retrieved properly.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter
Copy link

Codecov Report

Merging #2344 into master will increase coverage by 0.06%.
The diff coverage is 75.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2344      +/-   ##
==========================================
+ Coverage   61.50%   61.57%   +0.06%     
==========================================
  Files         160      160              
  Lines       13422    13519      +97     
==========================================
+ Hits         8255     8324      +69     
- Misses       4546     4570      +24     
- Partials      621      625       +4     
Impacted Files Coverage Δ
pkg/canary/comparator/comparator.go 77.08% <75.22%> (-2.64%) ⬇️
pkg/logql/evaluator.go 92.46% <0.00%> (-0.41%) ⬇️

@slim-bean slim-bean merged commit 81b9dec into master Jul 13, 2020
@slim-bean slim-bean deleted the canary-query-improvements branch July 13, 2020 20:44
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
* Saner defaults for configs

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Set spread_flushes to true in the code.

Signed-off-by: Tom Wilkie <tom@grafana.com>

* Make mockIngester implement HealthCheck and io.Closer so tests pass.

Signed-off-by: Tom Wilkie <tom@grafana.com>

* Address feedback

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Verify that querier sees correct ring before using it.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>

* Address feedback

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

Co-authored-by: Tom Wilkie <tom@grafana.com>
Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants