-
Notifications
You must be signed in to change notification settings - Fork 870
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
analytics(app): add telemetry to Evmos modules #637
Conversation
Codecov Report
@@ Coverage Diff @@
## main #637 +/- ##
==========================================
- Coverage 82.61% 82.53% -0.09%
==========================================
Files 122 122
Lines 6725 6870 +145
==========================================
+ Hits 5556 5670 +114
- Misses 1029 1055 +26
- Partials 140 145 +5
|
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.
I've become very eagle-eyed due to constantly looking and the linter errors.
I think we could either refactor as we improve on each module or enter improvements and let the Linter do its work when implemented so we can then add all warnings to the sub issues in ENG-284
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.
based on our conversation
- erc20 module:
- total number of transactions (counter with labels for denom and erc20 contract)
- total amount converted (counter with labels for denom and erc20 contract)
- on inflation, we care about
- the total amount of tokens minted (not epoch count)
- for incentives, we need to track the
- total amount of rewards allocated per contract (counter with label)
- total number of participants (labeled per contract)
- number of rewards allocated per participant (eg: to track bots)
- recovery: also add the amount of tokens recovered (counter)
- fees:
- total amount fees allocated to devs/contract deployers (label by contract) and validators (no label since it's allocated to the fee collector Module Account)
This would have to be implemented here I'm considering if this will be to nested, what do you think? |
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, Minor comments.
changes requested are not relevant in this PR
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
Description
This PR adds telemetry to Evmos to analyze the performance of the modules. A guide on telemetry in the Cosmos SDK can be found here. By generating this data we can understand how Evmos is being used, e.g. we can observe how many users interact with incentivized contracts and how many tokens were distributed in total through incentives.
Metrics
I implemented the following metrics to observe and added them to the specs:
tx_msg_convert_coin_amount_total
ConvertCoin
msgtx_msg_convert_coin_total
ConvertCoin
msgtx_msg_convert_erc20_amount_total
ConvertERC20
msgtx_msg_convert_erc20_total
ConvertERC20
msgtx_msg_ethereum_tx_total
tx_msg_ethereum_tx_gas_used_total
tx_msg_ethereum_tx_incentives_total
tx_msg_ethereum_tx_incentives_gas_used_total
incentives_distribute_participant_total
incentives_distribute_reward_total
inflation_hook_allocate_total
inflation_hook_allocate_staking_total
inflation_hook_allocate_incentives_total
inflation_hook_allocate_community_pool_total
recovery_ibc_on_recv_total
onRecvPacket
callbackrecovery_ibc_on_recv_token_total
onRecvPacket
callbackNotes
Reference used for naming endpoints: https://blog.pvincent.io/2017/12/prometheus-blog-series-part-2-metric-types/
Please also note that some endpoints are implemented in ethermint