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

Better logql metric status code. #1718

Merged
merged 4 commits into from
Feb 24, 2020

Conversation

cyriltovena
Copy link
Contributor

@cyriltovena cyriltovena commented Feb 19, 2020

This PR improves 3 areas:

  • Better status code for logql metrics.
  • More granular histogram based on historical data.
  • Querier now returns 400 only when there is a parsing error in the logql engine.

Fixes #1658

@codecov-io
Copy link

codecov-io commented Feb 19, 2020

Codecov Report

Merging #1718 into master will decrease coverage by 0.05%.
The diff coverage is 58.82%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1718      +/-   ##
=========================================
- Coverage   64.16%   64.1%   -0.06%     
=========================================
  Files         121     121              
  Lines        9024    9069      +45     
=========================================
+ Hits         5790    5814      +24     
- Misses       2829    2851      +22     
+ Partials      405     404       -1
Impacted Files Coverage Δ
pkg/logql/ast.go 88.18% <0%> (ø) ⬆️
pkg/loki/modules.go 11.29% <0%> (ø) ⬆️
pkg/querier/http.go 6.73% <0%> (-0.33%) ⬇️
pkg/querier/queryrange/roundtrip.go 80.43% <100%> (ø) ⬆️
pkg/logql/engine.go 90.06% <25%> (-1.14%) ⬇️
pkg/logql/metrics.go 80.64% <50%> (-5.07%) ⬇️
pkg/querier/queryrange/stats.go 82.75% <78.94%> (-17.25%) ⬇️
pkg/logql/parser.go 82% <83.33%> (-0.23%) ⬇️
pkg/querier/queryrange/codec.go 92.65% <0%> (-0.82%) ⬇️
pkg/promtail/targets/filetarget.go 70.55% <0%> (+1.84%) ⬆️
... and 1 more

pkg/logql/parser.go Outdated Show resolved Hide resolved
pkg/querier/queryrange/stats.go Show resolved Hide resolved
pkg/querier/queryrange/stats.go Show resolved Hide resolved
Improve frontend metrics to use a more granular status_code.
Improve prometheus histogram granularity.

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

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit 6363e8d into grafana:master Feb 24, 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.

Querier returns 400 for all type of errors.
3 participants