celestiaorg / celestia-core

A fork of CometBFT
Apache License 2.0
481 stars 264 forks source link

Add ABCI method timing histogram metric #1366

Open aWN4Y25pa2EK opened 4 months ago

aWN4Y25pa2EK commented 4 months ago

This PR introduces a new histogram metric, abci_connection_method_timing_seconds, to measure the timings for each of the ABCI methods. This metric will help in tracking and analysing the performance of various ABCI methods by providing detailed timing information. The metric includes labels for method and type to allow for granular analysis of the data.

Changes Introduced

Files to Review

metrics.go: This file contains the primary changes for adding the new metric. It includes updates to the Metrics struct, the PrometheusMetrics function, and the NopMetrics function.

Importance

Tracking the performance of ABCI methods is crucial for understanding and optimizing the behavior of the system. By adding this metric, we provide operators and developers with a tool to gain insights into the timing of different ABCI method executions, which can help in identifying bottlenecks and improving the overall efficiency of the system.