Skip navigation links

Package org.hyperledger.fabric.metrics

Supports collection of metrics

See: Description

Package org.hyperledger.fabric.metrics Description

Supports 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 ensure that there is a standard format Java properties file called `config.props` in the root of your contract code. For example this path

 myjava - contract - project / java / src / main / resources / config.props
This should contain the following
The metrics enabled flag will turn on default metrics logging. (it's off by default) The TP values establish the core thread pool size, max thread poolsize, and the number of of tasks that will wait. (5, 5, 5000 are the default values, so don't need to be explicitly specified). If no file is supplied metrics are not enabled, the values shown for the thread pool are used.
Skip navigation links