This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
feat: Add metrics about subnet usage on the state tree #191
Merged
Conversation
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
✅ Deploy Preview for ic-interface-spec ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
dsarlis
commented
Jun 28, 2023
This is modelled a lot after #94. Main difference is that I'm not changing anything about the provisional apis -- does not seem necessary for the metrics case and seemed to be the most contentious point back then. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
mraszyk
reviewed
Jul 17, 2023
Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com>
✅ Deploy Preview for ic-interface-spec ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
🤖 Here's your preview: https://pjpim-riaaa-aaaak-qckja-cai.icp0.io/docs |
gitlab-dfinity
pushed a commit
to dfinity/ic
that referenced
this pull request
Aug 31, 2023
feat: EXC-1468: Add subnet metrics to state tree This MR adds the subnet metrics specified in dfinity/interface-spec#191 in the replicated state as well as exposing them in the state tree under the `subnet/<subnet_id>/metrics` path. This MR only adds the metrics and encodes them in the tree conditionally as long as replicas are running on the corresponding certification version. Follow up MRs will actually bump the certification version and eventually expose the metrics through the proposed new endpoint as per the spec PR. See merge request dfinity-lab/public/ic!14438
alin-at-dfinity
approved these changes
Sep 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
Dfinity-Bjoern
approved these changes
Sep 5, 2023
gitlab-dfinity
pushed a commit
to dfinity/ic
that referenced
this pull request
Sep 6, 2023
chore: Rename subnet metrics This MR updates the subnet metrics included in the state tree according to the latest names agreed to in the [spec](dfinity/interface-spec#191). See merge request dfinity-lab/public/ic!14540
dsarlis
commented
Sep 8, 2023
gitlab-dfinity
pushed a commit
to dfinity/ic
that referenced
this pull request
Sep 27, 2023
feat: EXC-1469: Expose subnet metrics through the http api This MR implements the new http endpoint to retrieve subnet specific information from the system state tree as specified in dfinity/interface-spec#191. As noted in the spec PR, the canister endpoint supports the existing subnet related paths for backward compatibility reasons. Eventually, these paths will only be accessible through the new subnet endpoint. The key changes included: 1. Introducing a new `SubnetReadStateService` service modelled similarly to the existing `ReadStateService` which is now named `CanisterReadStateService`. 2. Moving the two services in a sub-module of read_state while keeping some common functions under `read_state.rs`. 3. The new service differs mainly in `verify_paths` and has some other small differences in `call` compared to the existing service due to certain checks that are not relevant. There are some unit tests included to make sure `SubnetReadStateService` correctly responds only to subnet paths requested and end to end tests will be in a follow up MR. See merge request dfinity-lab/public/ic!15000
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
The Internet Computer dashboard exposes various metrics that it retrieves from internal prometheus endpoints, including but not limited to: number of canisters on a subnet, memory used on a subnet, cycles burned, transactions made, etc.
The information shown in the dashboard cannot be verified by 3rd parties as it requires access to internally available only endpoints. As such, people must trust DFINITY who is building the dashboard that they provide correct information. We would like to expose some of these key metrics that show case the usage and capabilities of the IC in a way that is verifiable from external 3rd parties to foster a much more trustworthy ecosystem.
Proposal
The proposed solution is to expose these metrics through the system state tree. The gist of the proposal is to add a path such as:
which would return a blob of encoded data capturing the metrics that we would like to expose (could also consider a path per metric but might come with downsides, see my inline comment). This path would be exposed through a new
api/v2/subnet/<subnet_id>/read_state
endpoint. Having this endpoint allows us to move all other subtree paths under/subnet
to be served through this endpoint as well as the/time
path.