Added 'limit' query parameter support to /api/v1/status/tsdb endpoint#12336
Merged
juliusv merged 6 commits intoprometheus:mainfrom May 22, 2023
Merged
Added 'limit' query parameter support to /api/v1/status/tsdb endpoint#12336juliusv merged 6 commits intoprometheus:mainfrom
juliusv merged 6 commits intoprometheus:mainfrom
Conversation
Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
Contributor
Author
Contributor
Author
|
@juliusv Please take a look at web package changes. |
|
Happy to see this PR :) |
juliusv
reviewed
May 17, 2023
Member
|
CC @codesome for the TSDB changes, since the original TSDB stats features were introduced by him. |
Contributor
Author
Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
jesusvazquez
requested changes
May 22, 2023
Member
jesusvazquez
left a comment
There was a problem hiding this comment.
Seems almost ready. Left a minor change and also if you could please update PR description and title replacing topN with limit.
Then I think we're good to go 👍
Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
jesusvazquez
approved these changes
May 22, 2023
Member
jesusvazquez
left a comment
There was a problem hiding this comment.
LGTM, will wait for CI and then merge
Thank you!
Signed-off-by: Baskar Shanmugam <baskar.shanmugam.career@gmail.com>
Member
|
👍 CI passing :) |
codesome
reviewed
Jun 1, 2023
| @@ -978,7 +978,7 @@ func (h *Head) DisableNativeHistograms() { | |||
| } | |||
|
|
|||
| // PostingsCardinalityStats returns top 10 highest cardinality stats By label and value names. | |||
Member
There was a problem hiding this comment.
The comment needed an update here :)
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds the ability to limit the number of items returned for each TSDB stat by adding a new
limitquery parameter to the/api/v1/status/tsdbendpoint. By default, 10 items are returned.The implementation uses a max-heap to keep track of the top N values for each stat (existing logic).
This feature was implemented as part of addressing issue #11945.
Testing: