rooch icon indicating copy to clipboard operation
rooch copied to clipboard

[Metrics] Config metrics dashboard on grafana

Open baichuan3 opened this issue 1 year ago • 4 comments

Metrics

  • [x] #2139
  • [ ] #2141
  • [ ] #2142
  • [ ] #2143
  • [ ] #2144

Raw store metrics

  • pub raw_store_iter_latency_seconds: HistogramVec,
  • pub raw_store_iter_bytes: HistogramVec,
  • pub raw_store_iter_keys: HistogramVec,
  • pub raw_store_get_latency_seconds: HistogramVec,
  • pub raw_store_get_bytes: HistogramVec,
  • pub raw_store_multiget_latency_seconds: HistogramVec,
  • pub raw_store_multiget_bytes: HistogramVec,
  • pub raw_store_put_latency_seconds: HistogramVec,
  • pub raw_store_put_bytes: HistogramVec,
  • pub raw_store_write_batch_latency_seconds: HistogramVec,
  • pub raw_store_write_batch_bytes: HistogramVec,
  • pub raw_store_put_sync_latency_seconds: HistogramVec,
  • pub raw_store_put_sync_bytes: HistogramVec,
  • pub raw_store_write_batch_sync_latency_seconds: HistogramVec,
  • pub raw_store_write_batch_sync_bytes: HistogramVec,
  • pub raw_store_delete_latency_seconds: HistogramVec,
  • pub raw_store_deletes: IntCounterVec,
  • pub raw_store_num_active_cf_handles: IntGaugeVec,

State Metrics

  • pub state_update_fields_latency_seconds: HistogramVec,
  • pub state_update_fields_bytes: HistogramVec,
  • pub state_update_nodes_latency_seconds: HistogramVec,
  • pub state_update_nodes_bytes: HistogramVec,
  • pub state_apply_change_set_latency_seconds: HistogramVec,
  • pub state_apply_change_set_bytes: HistogramVec,
  • pub state_iter_latency_seconds: HistogramVec,
  • pub state_get_field_at_latency_seconds: HistogramVec,
  • pub state_get_field_at_bytes: HistogramVec,
  • pub state_list_fields_at_latency_seconds: HistogramVec,
  • pub state_list_fields_at_bytes: HistogramVec,

SMT Metrics

  • pub smt_put_latency_seconds: HistogramVec,
  • pub smt_put_bytes: HistogramVec,
  • pub smt_remove_latency_seconds: HistogramVec,
  • pub smt_remove_bytes: HistogramVec,
  • pub smt_get_latency_seconds: HistogramVec,
  • pub smt_get_bytes: HistogramVec,
  • pub smt_get_with_proof_latency_seconds: HistogramVec,
  • pub smt_get_with_proof_bytes: HistogramVec,
  • pub smt_list_latency_seconds: HistogramVec,
  • pub smt_list_bytes: HistogramVec,
  • pub smt_iter_latency_seconds: HistogramVec,
  • pub smt_puts_latency_seconds: HistogramVec,
  • pub smt_puts_bytes: HistogramVec,

Tx Metrics

pipeline processor metrics

  • pub pipeline_processor_execution_tx_latency_seconds: HistogramVec,
  • pub pipeline_processor_execution_tx_bytes: HistogramVec,
  • pub pipeline_processor_l1_block_gas_used: IntCounter,
  • pub pipeline_processor_l1_tx_gas_used: IntCounter,
  • pub pipeline_processor_l2_tx_gas_used: IntCounter,

sequencer metrics

  • pub sequencer_sequence_latency_seconds: HistogramVec,
  • pub sequencer_sequence_bytes: HistogramVec,

executor metrics

  • pub executor_execute_tx_latency_seconds: HistogramVec,
  • pub executor_execute_tx_bytes: HistogramVec,
  • pub executor_validate_tx_latency_seconds: HistogramVec,
  • pub executor_validate_tx_bytes: HistogramVec,

proposer metrics

  • pub proposer_transaction_propose_latency_seconds: HistogramVec,
  • pub proposer_transaction_propose_bytes: HistogramVec,
  • pub proposer_propose_block_latency_seconds: HistogramVec,
  • pub proposer_propose_block_batch_size: IntGauge,

Indexer Metrics

indexer store metrics

  • pub indexer_persist_or_update_or_delete_latency_seconds: HistogramVec,
  • pub indexer_persist_or_update_or_delete_bytes: HistogramVec,

indexer reader metrics

  • pub indexer_reader_query_latency_seconds: HistogramVec,

baichuan3 avatar Aug 05 '24 07:08 baichuan3

data from metrics api is missing these metrics:

state_update_fields_bytes state_update_nodes_latency_seconds state_update_nodes_bytes smt_put_latency_seconds ...

yourmoonlight avatar Aug 05 '24 12:08 yourmoonlight

Should we add metrics to HTTP and socket middleware, or to all processes?

Request Metrics

requests_by_route inflight_requests_by_route req_latency_by_route

Error Metrics

errors_by_route client_errors_by_route

Connection Metrics

IntCounterVec inflight_connection

Data Size Metrics

rpc_request_size rpc_response_size ...

wow-sven avatar Sep 07 '24 16:09 wow-sven

The rpc framework jsonrpsee does not directly expose metrics yet. If the middleware supports directly exposing metrics, it will be more convenient to implement metrics.

baichuan3 avatar Sep 09 '24 01:09 baichuan3

The rpc framework jsonrpsee does not directly expose metrics yet. If the middleware supports directly exposing metrics, it will be more convenient to implement metrics.

You can track the entire process on JsonRpcService

wow-sven avatar Sep 09 '24 02:09 wow-sven