Skip to content
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

[Bug]: telemetry in msg handlers runs multiple times leading to unexpected metric values #21614

Open
1 task done
migueldingli1997 opened this issue Sep 9, 2024 · 0 comments
Labels

Comments

@migueldingli1997
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Message logic is executed at least twice, once in checkTx and once during block finalization. Telemetry logic does not distinguish between these two modes and runs regardless, meaning that counters are incremented at least twice.

One example of this is the new_account counter which is incremented when we send tokens to a new account. The result is that this counter actually increments by 2 with each new account.

I suppose it could increment even more times if we run in other modes, such as to simulate a transaction, but I haven't experimented with this.

Cosmos SDK Version

0.50.9

How to reproduce?

  • Run a chain with Prometheus telemetry enabled
  • Send tokens to an account that does not exist
  • Look up the new_account metric at :1317/metrics?format=prometheus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant