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

Add sharded queries metrics #5650

Merged
merged 9 commits into from
Aug 30, 2022
Merged

Conversation

idoqo
Copy link
Contributor

@idoqo idoqo commented Aug 26, 2022

This commit adds basic metrics to track the number of shardable and non-shardable queries processed by PromQLShardingMiddleware.

Fixes #5606

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

Newly added metrics show up in http://<query-frontend-address>/metrics

Signed-off-by: idoko <okokomichaels@outlook.com>
Signed-off-by: idoko <okokomichaels@outlook.com>
@idoqo idoqo marked this pull request as ready for review August 26, 2022 11:44
@fpetkovski
Copy link
Contributor

This is looking really good. I just wonder if we should make the result a label so that ration calculation can be easier. E.g

rate(frontend_sharding_middleware_queries_total{shardable="true"}[5m])
/
rate(frontend_sharding_middleware_queries_total[5m])

@yeya24
Copy link
Contributor

yeya24 commented Aug 26, 2022

Agree, let's make it shardable a label and keep one metric only

@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 28, 2022
Signed-off-by: idoko <okokomichaels@outlook.com>
@pull-request-size pull-request-size bot added size/S and removed size/M labels Aug 28, 2022
Signed-off-by: idoko <okokomichaels@outlook.com>
Copy link
Contributor

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

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

Nice work, thanks!

@yeya24
Copy link
Contributor

yeya24 commented Aug 29, 2022

We need another rebase.

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: idoko <okokomichaels@outlook.com>
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: idoko <okokomichaels@outlook.com>
@yeya24 yeya24 enabled auto-merge (squash) August 30, 2022 18:33
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

LGTM

@yeya24 yeya24 merged commit 95f8596 into thanos-io:main Aug 30, 2022
prajain12 pushed a commit to prajain12/thanos that referenced this pull request Sep 6, 2022
* add query sharding metrics

Signed-off-by: idoko <okokomichaels@outlook.com>

* update changelog.md

Signed-off-by: idoko <okokomichaels@outlook.com>

* use CounterVec for sharding metrics

Signed-off-by: idoko <okokomichaels@outlook.com>

* revert to literal value

Signed-off-by: idoko <okokomichaels@outlook.com>

* move changes to unreleased

Signed-off-by: idoko <okokomichaels@outlook.com>

* fix PR number in changelog

Signed-off-by: idoko <okokomichaels@outlook.com>

Signed-off-by: idoko <okokomichaels@outlook.com>
Signed-off-by: Prakul Jain <prakul.jain@udaan.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.

Add metrics to PromQLShardingMiddleware
3 participants