-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime/metrics: Delete metrics on object delete
Delete the object metrics when the object is deleted. This ensures that stale metrics about a deleted object is no longer exported. As a result, the `ConditionDelete` is no longer needed. Another reason to not have `ConditionDelete` is that a condition can only be one of True, False or Unknown. This introduces new delete methods in the low level metrics Recorder. In the high level controller metrics, the existing Record*() methods are updated to check if the given object is deleted, and call record or delete based on that. This helps make this change transparent. The user of this API don't need to update any code for the metrics to get deleted when the associated object is deleted. Signed-off-by: Sunny <[email protected]>
- Loading branch information
Showing
3 changed files
with
117 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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