Metrics gc#6562
Draft
pablogrs wants to merge 2 commits into
Draft
Conversation
Ensure Prometheus cleanup removes all per-PR counter metrics emitted by InstrumentedProjectCommandRunner, not just success and error counters.
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 pull request introduces a new configurable retention period for metrics related to inactive pull requests (PRs), adds a mechanism to clean up metric scopes for closed PRs, and refactors metric tagging to use a centralized PR scope manager. It also updates documentation and improves the way metrics are tagged for PR-related events and VCS operations.
Metrics retention and cleanup:
--metrics-inactive-pr-retentionserver flag (and corresponding environment variable) to control how long metrics for inactive PRs are retained before cleanup, with validation and documentation updates. [1] [2] [3] [4] [5] [6] [7]ScopeCleanerinterface and integrates it into the PR cleanup flow to mark closed PRs for metric cleanup and periodically remove stale metric scopes. [1] [2] [3]Metric tagging and scope management:
PRScopeManager, ensuring consistent and closeable PR-specific metric scopes throughout the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Metrics tagging improvements:
base_repoandpr_numberinstead of a helper function, improving clarity and consistency.Codebase cleanup and test improvements:
why
tests
references