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

query tee proxy with support for comparison of responses #2211

Merged
merged 2 commits into from
Jun 16, 2020

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
Add querytee for proxying queries to 2 different loki instances. The code is reused from Cortex and more details about it can be found here. The only difference is it registers Loki specific routes and adds support for comparing log streams.

Special notes for your reviewer:
Routes are registered with GET method only because querytee didn't have support for registering routes with multiple method types. I have a PR in cortex to add support for it.
I will open a PR soon after updating Cortex vendor to add support for POST methods as well. Until then POST methods for querying won't work.

Checklist

  • Tests updated

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 - minus lint

@codecov-commenter
Copy link

Codecov Report

Merging #2211 into master will decrease coverage by 0.11%.
The diff coverage is 44.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2211      +/-   ##
==========================================
- Coverage   62.14%   62.02%   -0.12%     
==========================================
  Files         154      156       +2     
  Lines       12457    12531      +74     
==========================================
+ Hits         7741     7772      +31     
- Misses       4108     4149      +41     
- Partials      608      610       +2     
Impacted Files Coverage Δ
cmd/querytee/main.go 0.00% <0.00%> (ø)
cmd/querytee/response_comparator.go 89.18% <89.18%> (ø)
pkg/querier/queryrange/downstreamer.go 95.87% <0.00%> (-2.07%) ⬇️

@sandeepsukhani sandeepsukhani merged commit f04bc99 into grafana:master Jun 16, 2020
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.

3 participants