-
Notifications
You must be signed in to change notification settings - Fork 323
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
Prometheus metric wallet_balance
incorrect
#2381
Comments
wallet_balance
incorrect
Hi @mturkia we can suggest the following solution. Instead of parametrising the value used to divide the balance, we will correct the description of the
Would this solution be acceptable ? |
Some operators are reporting that they would like to keep the raw balance as was previously reported. In fact, they use wallets with small amount of coins which fit into a u64 and are therefore not interested in the divided value which is throwing off their metrics. I would suggest we still add a setting to specify by how much to divide or more simply by how many decimals to remove from the balance (eg. a setting of 6 would divide by 10^6). |
I think that from usage point of view, the raw balance would be better than always dividing by 6. So either raw value, or correct base unit value. |
We cannot do the raw value only because some operators use wallets with with a high balance which overflows the u64 counter (the Rust OpenTelemetry crate currently only support 64-bits counters) but with this change you should be able to get the raw value by eg. setting the exponent to 0 if we take it to mean "divide by 10^{exponent}". Would that work for you? |
Should be fine for me |
Summary of Bug
The wallet_balance prometheus metrics converts the account balance by dividing value by 10^6, which works for most Cosmos chains, but does not work e.g. for Crypto.org chain where it should be 10^8, or evmos with 10^18. There are also other chains with base unit something else than micro.
Version
0.15.0+e3d0b108
Steps to Reproduce
Configure Hermes with crypto.org (or fetch, evmos, provenance) and add e.g. 1 cro (100000000basecro) to the account. Observe that wallet_balance gives you 100cro as balance.
Acceptance Criteria
Correct chain specific denom exponent is used to calculate account balance.
For Admin Use
The text was updated successfully, but these errors were encountered: