Add ABCI method timing histogram metric #1366
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new histogram metric,
abci_connection_method_timing_seconds
, to measure the timings for each of theABCI methods
. This metric will help in tracking and analysing the performance of variousABCI methods
by providing detailed timing information. The metric includes labels for method and type to allow for granular analysis of the data.Changes Introduced
New Metric
: Theabci_connection_method_timing_seconds
histogram metric is added to capture the duration of ABCI method calls.Metrics Struct Update
: The Metrics struct is updated to include the new histogram metric.Prometheus Metrics Initialization
: The PrometheusMetrics function is updated to initialize the new histogram metric with appropriate labels.No-Op Metrics Update
: The NopMetrics function is updated to include a no-op version of the new histogram metric.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.