-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add instruction stats tracking to #[update] attribute. #1830
Merged
daniel-wong-dfinity-org
merged 3 commits into
master
from
instruction-stats-update-attribute-daniel-wong
Oct 21, 2024
Merged
feat: Add instruction stats tracking to #[update] attribute. #1830
daniel-wong-dfinity-org
merged 3 commits into
master
from
instruction-stats-update-attribute-daniel-wong
Oct 21, 2024
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
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
2 times, most recently
from
October 3, 2024 14:21
3b1bde9
to
75df2a8
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 4, 2024 17:54
3f22418
to
da92148
Compare
daniel-wong-dfinity-org
changed the base branch from
master
to
instruction-stats-daniel-wong
October 4, 2024 17:55
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 4, 2024 18:01
da92148
to
dd956dc
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-daniel-wong
branch
from
October 4, 2024 18:06
e6a69d4
to
e4e0c41
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 4, 2024 18:06
dd956dc
to
4392bfc
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-daniel-wong
branch
from
October 4, 2024 18:59
e4e0c41
to
2902b53
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 4, 2024 19:00
4392bfc
to
25110e1
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-daniel-wong
branch
from
October 14, 2024 16:51
2902b53
to
91ab2ee
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 14, 2024 16:51
25110e1
to
f45f0bc
Compare
anchpop
approved these changes
Oct 14, 2024
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-daniel-wong
branch
2 times, most recently
from
October 21, 2024 15:44
9ac1122
to
233a00c
Compare
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 21, 2024 16:01
f989b36
to
67f5b74
Compare
…ame thing as the one in ic_cdk. The difference is that this adds instruction stats tracking to canister methods.
daniel-wong-dfinity-org
force-pushed
the
instruction-stats-update-attribute-daniel-wong
branch
from
October 21, 2024 16:34
67f5b74
to
4e31b66
Compare
daniel-wong-dfinity-org
deleted the
instruction-stats-update-attribute-daniel-wong
branch
October 21, 2024 18:48
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.
This is generic enough that it can be applied to all ic-cdk-based canisters that use ic-metrics-encoder to expose Prometheus metrics.
Usage
Suppose you already have a main canister file that does this:
To apply this throughout that canister, you would simply replace that line with this:
Once you do that, instruction stats will be collected for all of your canister methods. To expose that data, you simply need add this call to your
encode_metrics
function:Future Work
In later PRs, the intention is for this to be gradually applied to all NNS and SNS canisters.
👈 Previous PR