fix(compactor): correct misleading help text for cortex_compactor_garbage_collected_blocks_total#7673
Open
Goutham-Annem wants to merge 1 commit into
Conversation
…bage_collected_blocks_total The metric counted blocks garbage collected by the Thanos syncer (i.e., blocks deleted after being marked), not all blocks marked for deletion. Its help string was identical to cortex_compactor_blocks_marked_for_deletion_total, which caused confusion for operators monitoring compaction activity. Fixes cortexproject#3610 Signed-off-by: Goutham Annem <gouthemannem@gmail.com>
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.
What this PR does:
The metric
cortex_compactor_garbage_collected_blocks_totalhad anidentical help string to
cortex_compactor_blocks_marked_for_deletion_total(
"Total number of blocks marked for deletion by compactor."), which wasconfusing and misleading. The two metrics track different things:
cortex_compactor_garbage_collected_blocks_total— counts blocks that theThanos syncer's GC pass has actually garbage-collected (i.e., deleted after
previously being marked). Sourced from Thanos
pkg/compact/compact.go.cortex_compactor_blocks_marked_for_deletion_total— counts blocks thatCortex's own logic has explicitly marked for deletion.
This PR corrects the help text to accurately describe what the metric
measures:
"Total number of blocks garbage collected (deleted after being marked) by the compactor syncer."The test expectation is updated to match.Which issue(s) this PR fixes:
Fixes #3610
Checklist
CHANGELOG.mdupdated