feat: Add canister_metrics management canister endpoint#10088
Merged
michael-weigelt merged 1 commit intodfinity:masterfrom May 5, 2026
Merged
feat: Add canister_metrics management canister endpoint#10088michael-weigelt merged 1 commit intodfinity:masterfrom
michael-weigelt merged 1 commit intodfinity:masterfrom
Conversation
Contributor
michael-weigelt
approved these changes
May 5, 2026
schneiderstefan
approved these changes
May 5, 2026
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.
Implement the
canister_metricsendpoint as described in dfinity/portal#6217 to allow controllers or subnet admins to retrieve canister level metrics for a target canister. The metrics currently contain some basic cycles related ones but can be extended in the future to contain more.The necessary boilerplate is added to wire the new endpoint through the code stack. As defined in the interface spec, the API is available both in replicated mode as well as a query call.
A few tests are also added to ensure that the endpoint correctly returns the values that are present in the replicated state.