POC for enabling services to manage their own metrics #16224
Labels
Feature Enhancement
Enhancing an existing feature driven by business requirements. Typically backwards compatible.
Milestone
Many of the services-related node metrics are metrics generated for each transaction type, independent of the service that produces them. However, as part of an EVM metric requirements effort, we want to provide a way for a service to manage a set of its own metrics. A first pass has been done here. This ticket is for exploring the possibility of creating a more generic solution, and to demonstrate the concept with a POC.
The services layer follows a typical pattern of injecting needed system functionality via context objects, while also restricting service access to each service's own scope (in the majority of cases). For example, the
com.hedera.node.app.spi.store.StoreFactory
interface is used to create restricted wrappers around a service's portions of state. Having a similar mechanism for creating and managing metrics would give each service a built-in way to focus on their own metrics logic while avoiding the hassle of integrating said metrics into the internals of the consensus node. However, if this approach will not work, we likely want to find another solution.We will need a solution for contracts, at the very least, to go into the 0.57 release. In the worst case, the code from PR #16077 is a possible candidate if a better design can't be decided on before the deadline.
The text was updated successfully, but these errors were encountered: