diff --git a/common/metrics/gendoc/options.go b/common/metrics/gendoc/options.go index 3dcb6058bd7..2b67d74bcdd 100644 --- a/common/metrics/gendoc/options.go +++ b/common/metrics/gendoc/options.go @@ -72,7 +72,8 @@ func FileOptions(f *ast.File) ([]interface{}, error) { if !ok { continue } - if imports[ident.Name] != "github.com/hyperledger/fabric/common/metrics" { + if imports[ident.Name] != "github.com/hyperledger/fabric/common/metrics" && + imports[ident.Name] != "github.com/SmartBFT-Go/consensus/pkg/metrics" { continue } option, err := createOption(literalType) diff --git a/docs/source/metrics_reference.rst b/docs/source/metrics_reference.rst index 790b7d39e23..ada9d2e2ae9 100644 --- a/docs/source/metrics_reference.rst +++ b/docs/source/metrics_reference.rst @@ -9,182 +9,235 @@ Prometheus The following orderer metrics are exported for consumption by Prometheus. -+----------------------------------------------+-----------+------------------------------------------------------------+--------------------------------------------------------------------------------+ -| Name | Type | Description | Labels | -+==============================================+===========+============================================================+===========+====================================================================+ -| blockcutter_block_fill_duration | histogram | The time from first transaction enqueing to the block | channel | | -| | | being cut in seconds. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| broadcast_enqueue_duration | histogram | The time to enqueue a transaction in seconds. | channel | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | type | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | status | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| broadcast_processed_count | counter | The number of transactions processed. | channel | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | type | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | status | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| broadcast_validate_duration | histogram | The time to validate a transaction in seconds. | channel | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | type | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | status | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_egress_queue_capacity | gauge | Capacity of the egress queue. | host | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | msg_type | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_egress_queue_length | gauge | Length of the egress queue. | host | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | msg_type | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_egress_queue_workers | gauge | Count of egress queue workers. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_egress_stream_count | gauge | Count of streams to other nodes. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_egress_tls_connection_count | gauge | Count of TLS connections to other nodes. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_ingress_stream_count | gauge | Count of streams from other nodes. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_msg_dropped_count | counter | Count of messages dropped. | host | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| cluster_comm_msg_send_time | histogram | The time it takes to send a message in seconds. | host | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_BFT_cluster_size | gauge | Number of nodes in this channel. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_BFT_committed_block_number | gauge | The number of the latest committed block. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_BFT_is_leader | gauge | The leadership status of the current node according to the | channel | | -| | | latest committed block: 1 if it is the leader else 0. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_BFT_leader_id | gauge | The id of the current leader according to the latest | channel | | -| | | committed block. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_active_nodes | gauge | Number of active nodes in this channel. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_cluster_size | gauge | Number of nodes in this channel. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_committed_block_number | gauge | The block number of the latest block committed. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_config_proposals_received | counter | The total number of proposals received for config type | channel | | -| | | transactions. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_data_persist_duration | histogram | The time taken for etcd/raft data to be persisted in | channel | | -| | | storage (in seconds). | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_is_leader | gauge | The leadership status of the current node: 1 if it is the | channel | | -| | | leader else 0. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_leader_changes | counter | The number of leader changes since process start. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_normal_proposals_received | counter | The total number of proposals received for normal type | channel | | -| | | transactions. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_proposal_failures | counter | The number of proposal failures. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| consensus_etcdraft_snapshot_block_number | gauge | The block number of the latest snapshot. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| deliver_blocks_sent | counter | The number of blocks sent by the deliver service. | channel | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | filtered | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | data_type | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| deliver_requests_completed | counter | The number of deliver requests that have been completed. | channel | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | filtered | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | data_type | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | success | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| deliver_requests_received | counter | The number of deliver requests that have been received. | channel | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | filtered | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | data_type | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| deliver_streams_closed | counter | The number of GRPC streams that have been closed for the | | | -| | | deliver service. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| deliver_streams_opened | counter | The number of GRPC streams that have been opened for the | | | -| | | deliver service. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| fabric_version | gauge | The active version of Fabric. | version | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_comm_conn_closed | counter | gRPC connections closed. Open minus closed is the active | | | -| | | number of connections. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_comm_conn_opened | counter | gRPC connections opened. Open minus closed is the active | | | -| | | number of connections. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_stream_messages_received | counter | The number of stream messages received. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_stream_messages_sent | counter | The number of stream messages sent. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_stream_request_duration | histogram | The time to complete a stream request. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | code | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_stream_requests_completed | counter | The number of stream requests completed. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | code | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_stream_requests_received | counter | The number of stream requests received. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_unary_request_duration | histogram | The time to complete a unary request. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | code | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_unary_requests_completed | counter | The number of unary requests completed. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | code | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| grpc_server_unary_requests_received | counter | The number of unary requests received. | service | | -| | | +-----------+--------------------------------------------------------------------+ -| | | | method | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| ledger_blockchain_height | gauge | Height of the chain in blocks. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| ledger_blockstorage_commit_time | histogram | Time taken in seconds for committing the block to storage. | channel | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| logging_entries_checked | counter | Number of log entries checked against the active logging | level | | -| | | level | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| logging_entries_written | counter | Number of log entries that are written | level | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| participation_consensus_relation | gauge | The channel participation consensus relation of the node: | channel | | -| | | 0 if other, 1 if consenter, 2 if follower, 3 if | | | -| | | config-tracker. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ -| participation_status | gauge | The channel participation status of the node: 0 if | channel | | -| | | inactive, 1 if active, 2 if onboarding, 3 if failed. | | | -+----------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ ++------------------------------------------------------+-----------+------------------------------------------------------------+--------------------------------------------------------------------------------+ +| Name | Type | Description | Labels | ++======================================================+===========+============================================================+===========+====================================================================+ +| blockcutter_block_fill_duration | histogram | The time from first transaction enqueing to the block | channel | | +| | | being cut in seconds. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| broadcast_enqueue_duration | histogram | The time to enqueue a transaction in seconds. | channel | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | type | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | status | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| broadcast_processed_count | counter | The number of transactions processed. | channel | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | type | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | status | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| broadcast_validate_duration | histogram | The time to validate a transaction in seconds. | channel | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | type | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | status | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_egress_queue_capacity | gauge | Capacity of the egress queue. | host | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | msg_type | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_egress_queue_length | gauge | Length of the egress queue. | host | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | msg_type | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_egress_queue_workers | gauge | Count of egress queue workers. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_egress_stream_count | gauge | Count of streams to other nodes. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_egress_tls_connection_count | gauge | Count of TLS connections to other nodes. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_ingress_stream_count | gauge | Count of streams from other nodes. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_msg_dropped_count | counter | Count of messages dropped. | host | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| cluster_comm_msg_send_time | histogram | The time it takes to send a message in seconds. | host | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_BFT_cluster_size | gauge | Number of nodes in this channel. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_BFT_committed_block_number | gauge | The number of the latest committed block. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_BFT_is_leader | gauge | The leadership status of the current node according to the | channel | | +| | | latest committed block: 1 if it is the leader else 0. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_BFT_leader_id | gauge | The id of the current leader according to the latest | channel | | +| | | committed block. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_active_nodes | gauge | Number of active nodes in this channel. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_cluster_size | gauge | Number of nodes in this channel. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_committed_block_number | gauge | The block number of the latest block committed. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_config_proposals_received | counter | The total number of proposals received for config type | channel | | +| | | transactions. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_data_persist_duration | histogram | The time taken for etcd/raft data to be persisted in | channel | | +| | | storage (in seconds). | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_is_leader | gauge | The leadership status of the current node: 1 if it is the | channel | | +| | | leader else 0. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_leader_changes | counter | The number of leader changes since process start. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_normal_proposals_received | counter | The total number of proposals received for normal type | channel | | +| | | transactions. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_proposal_failures | counter | The number of proposal failures. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_etcdraft_snapshot_block_number | gauge | The block number of the latest snapshot. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_blacklist_count | gauge | Count of nodes in blacklist on this channel. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_consensus_latency_sync | histogram | An average time it takes to sync node. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_consensus_reconfig | counter | Number of reconfiguration requests. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_node_id_in_blacklist | gauge | Node ID in blacklist on this channel. | blackid | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_count_leader_forward_request | counter | Number of requests forwarded to the leader. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_count_of_delete_request | counter | Number of elements removed from the request pool. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_count_of_elements | gauge | Number of elements in the consensus request pool. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_count_of_elements_all | counter | Total amount of elements in the request pool. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_count_of_fail_add_request | counter | Number of requests pool insertion failure. | reason | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_count_timeout_two_step | counter | Number of times requests reached second timeout. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_pool_latency_of_elements | histogram | The average request processing time, time request resides | | | +| | | in the pool. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_count_batch_all | counter | Amount of batched processed. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_count_txs_all | counter | Total amount of transactions. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_count_txs_in_batch | gauge | The number of transactions per batch. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_decisions | gauge | The number of decisions in the current view. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_latency_batch_processing | histogram | Amount of time it take to process batch. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_latency_batch_save | histogram | An average time it takes to persist batch. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_leader_id | gauge | The leader id. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_number | gauge | The View number value. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_phase | gauge | Current consensus phase. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_proposal_sequence | gauge | The sequence number within current view. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_view_size_batch | counter | An average batch size. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_viewchange_current_view | gauge | current view of viewchange on this channel. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_viewchange_next_view | gauge | next view of viewchange on this channel. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_viewchange_real_view | gauge | real view of viewchange on this channel. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| consensus_smartbft_wal_count_of_files | gauge | Count of wal-files. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| deliver_blocks_sent | counter | The number of blocks sent by the deliver service. | channel | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | filtered | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | data_type | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| deliver_requests_completed | counter | The number of deliver requests that have been completed. | channel | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | filtered | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | data_type | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | success | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| deliver_requests_received | counter | The number of deliver requests that have been received. | channel | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | filtered | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | data_type | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| deliver_streams_closed | counter | The number of GRPC streams that have been closed for the | | | +| | | deliver service. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| deliver_streams_opened | counter | The number of GRPC streams that have been opened for the | | | +| | | deliver service. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| fabric_version | gauge | The active version of Fabric. | version | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_comm_conn_closed | counter | gRPC connections closed. Open minus closed is the active | | | +| | | number of connections. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_comm_conn_opened | counter | gRPC connections opened. Open minus closed is the active | | | +| | | number of connections. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_stream_messages_received | counter | The number of stream messages received. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_stream_messages_sent | counter | The number of stream messages sent. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_stream_request_duration | histogram | The time to complete a stream request. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | code | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_stream_requests_completed | counter | The number of stream requests completed. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | code | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_stream_requests_received | counter | The number of stream requests received. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_unary_request_duration | histogram | The time to complete a unary request. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | code | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_unary_requests_completed | counter | The number of unary requests completed. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | code | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| grpc_server_unary_requests_received | counter | The number of unary requests received. | service | | +| | | +-----------+--------------------------------------------------------------------+ +| | | | method | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| ledger_blockchain_height | gauge | Height of the chain in blocks. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| ledger_blockstorage_commit_time | histogram | Time taken in seconds for committing the block to storage. | channel | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| logging_entries_checked | counter | Number of log entries checked against the active logging | level | | +| | | level | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| logging_entries_written | counter | Number of log entries that are written | level | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| participation_consensus_relation | gauge | The channel participation consensus relation of the node: | channel | | +| | | 0 if other, 1 if consenter, 2 if follower, 3 if | | | +| | | config-tracker. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ +| participation_status | gauge | The channel participation status of the node: 0 if | channel | | +| | | inactive, 1 if active, 2 if onboarding, 3 if failed. | | | ++------------------------------------------------------+-----------+------------------------------------------------------------+-----------+--------------------------------------------------------------------+ StatsD ~~~~~~ @@ -258,6 +311,59 @@ associated with the metric. +---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ | consensus.etcdraft.snapshot_block_number.%{channel} | gauge | The block number of the latest snapshot. | +---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.blacklist_count | gauge | Count of nodes in blacklist on this channel. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.consensus_latency_sync | histogram | An average time it takes to sync node. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.consensus_reconfig | counter | Number of reconfiguration requests. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.node_id_in_blacklist.%{blackid} | gauge | Node ID in blacklist on this channel. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_count_leader_forward_request | counter | Number of requests forwarded to the leader. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_count_of_delete_request | counter | Number of elements removed from the request pool. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_count_of_elements | gauge | Number of elements in the consensus request pool. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_count_of_elements_all | counter | Total amount of elements in the request pool. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_count_of_fail_add_request.%{reason} | counter | Number of requests pool insertion failure. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_count_timeout_two_step | counter | Number of times requests reached second timeout. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.pool_latency_of_elements | histogram | The average request processing time, time request resides | +| | | in the pool. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_count_batch_all | counter | Amount of batched processed. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_count_txs_all | counter | Total amount of transactions. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_count_txs_in_batch | gauge | The number of transactions per batch. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_decisions | gauge | The number of decisions in the current view. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_latency_batch_processing | histogram | Amount of time it take to process batch. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_latency_batch_save | histogram | An average time it takes to persist batch. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_leader_id | gauge | The leader id. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_number | gauge | The View number value. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_phase | gauge | Current consensus phase. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_proposal_sequence | gauge | The sequence number within current view. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.view_size_batch | counter | An average batch size. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.viewchange_current_view | gauge | current view of viewchange on this channel. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.viewchange_next_view | gauge | next view of viewchange on this channel. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.viewchange_real_view | gauge | real view of viewchange on this channel. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ +| consensus.smartbft.wal_count_of_files | gauge | Count of wal-files. | ++---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ | deliver.blocks_sent.%{channel}.%{filtered}.%{data_type} | counter | The number of blocks sent by the deliver service. | +---------------------------------------------------------------------------+-----------+------------------------------------------------------------+ | deliver.requests_completed.%{channel}.%{filtered}.%{data_type}.%{success} | counter | The number of deliver requests that have been completed. | diff --git a/scripts/metrics_doc.sh b/scripts/metrics_doc.sh index b2f6b5e4db4..de6f14f8fd2 100755 --- a/scripts/metrics_doc.sh +++ b/scripts/metrics_doc.sh @@ -15,7 +15,7 @@ generate_doc() { local peer_statsd local orderer_deps=() - while IFS= read -r pkg; do orderer_deps+=("$pkg"); done < <(go list -deps github.com/hyperledger/fabric/cmd/orderer | sort -u | grep hyperledger) + while IFS= read -r pkg; do orderer_deps+=("$pkg"); done < <(go list -deps github.com/hyperledger/fabric/cmd/orderer | sort -u | grep -E "(hyperledger|SmartBFT-Go/consensus)") orderer_prom="$($gendoc_command -template <(echo '{{PrometheusTable}}') "${orderer_deps[@]}")" orderer_statsd="$($gendoc_command -template <(echo '{{StatsdTable}}') "${orderer_deps[@]}")"