Package org.hyperledger.fabric.metrics
Provides interfaces and classes to support collection of metrics.
The main metrics that are available are the statistics around the number of tasks that are running, and how the thread pool is handling these.
Note a 'task' is a message from the Peer to the Chaincode - this message is either a new transaction, or a response from a stub API, eg getState(). Query apis may return more than one response.
To enable metrics, add a CHAINCODE_METRICS_ENABLED=true
setting
to the config.props
chaincode configuration file.
See the Overview for details of how to
configure chaincode.
-
Interface Summary Interface Description MetricsProvider Interface to be implemented to send metrics on the chaincode to the 'backend-of-choice'.TaskMetricsCollector Collect metrics relating to the task execution. -
Class Summary Class Description Metrics Metrics Interface.