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

Split label names queries in the frontend. #2441

Merged
merged 2 commits into from
Jul 29, 2020

Conversation

cyriltovena
Copy link
Contributor

Build on top of #2436 and adds the ability to split label names queries.
Those queries are heavy to run for long period and so splitting by day should improve query performance.

The frontend also support the old legacy label names API which has a different response.

We currently split too much by using the same split duration for query range.
Let's start with 24h, just tested in ops-tools and it works better.
We could later introduce a config.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Build on top of grafana#2436 and adds the ability to split label names queries.
Those queries are heavy to run for long period and so splitting by day should improve query performance.

The frontend also support the old legacy label names API which has a different response.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #2441 into master will increase coverage by 0.09%.
The diff coverage is 82.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2441      +/-   ##
==========================================
+ Coverage   62.81%   62.91%   +0.09%     
==========================================
  Files         162      162              
  Lines       13850    13950     +100     
==========================================
+ Hits         8700     8776      +76     
- Misses       4471     4490      +19     
- Partials      679      684       +5     
Impacted Files Coverage Δ
pkg/querier/queryrange/codec.go 87.55% <76.47%> (-3.21%) ⬇️
pkg/querier/queryrange/roundtrip.go 70.35% <84.61%> (+0.73%) ⬆️
pkg/querier/queryrange/limits.go 100.00% <100.00%> (ø)
pkg/querier/queryrange/split_by_interval.go 88.40% <100.00%> (+0.80%) ⬆️
pkg/querier/queryrange/downstreamer.go 95.87% <0.00%> (-2.07%) ⬇️
pkg/logql/evaluator.go 92.47% <0.00%> (-0.41%) ⬇️
pkg/promtail/targets/file/tailer.go 78.40% <0.00%> (+4.54%) ⬆️

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

LGTM!

@slim-bean slim-bean merged commit 9ad98df into grafana:master Jul 29, 2020
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

this is really nice. great work.

@adityacs
Copy link
Contributor

@cyriltovena need your review comments on this PR #2202 . Caching for labels API is also dependent on this

cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
Signed-off-by: Aditya C S <aditya.gnu@gmail.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.

5 participants