-
Notifications
You must be signed in to change notification settings - Fork 130
[PIE-1580] Metrics for smart contract permissioning actions #1492
[PIE-1580] Metrics for smart contract permissioning actions #1492
Conversation
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.
👍 Looks good.
this.contractAddress = contractAddress; | ||
this.transactionSimulator = transactionSimulator; | ||
|
||
this.checkCounter = |
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.
If we have the counter for permitted and unpermitted, do we really need the total counter or can we just infer from the other two metrics?
I'm not aware of the impact of the metrics in system resources so maybe we are better playing safe?
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.
There's an outcome where the permissioning check crashes (no contract, bad transaction etc) which increments the total counter but not the other 2. I'm assuming the metrics are no heavier than adding log lines so I decided to be distinct about all the things we might be checking.
this.contractAddress = contractAddress; | ||
this.transactionSimulator = transactionSimulator; | ||
|
||
this.checkCounter = |
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.
Same thing about the total checks counter.
I'm not sure how the names of the metrics are put together later, but I wonder if we could create some hierarchical namespace to make it easier to understand. e.g. we could have a "parent" counter for node permissioning and one for account permissioning. In the case of node permissioning, we could then have the metrics for each provider, and for account permissioning the metrics for the local config and onchain checks. Something like:
|
plumbing some metrics into the permissioning controllers so we can measure their performance.