Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ABCI method timing histogram metric #1366

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions consensus/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ type Metrics struct {

// The amount of proposals that failed to be received in time
TimedOutProposals metrics.Counter

// Timings for each of the ABCI methods.
ABCIMethodTimingSeconds metrics.Histogram
}

// PrometheusMetrics returns Metrics build using Prometheus client library.
Expand Down Expand Up @@ -267,6 +270,12 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
Name: "timed_out_proposals",
Help: "Number of proposals that failed to be received in time",
}, labels).With(labelsAndValues...),
ABCIMethodTimingSeconds: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{
Namespace: namespace,
Subsystem: MetricsSubsystem,
Name: "abci_connection_method_timing_seconds",
Help: "Timings for each of the ABCI methods.",
}, append(labels, "method", "type")).With(labelsAndValues...),
}
}

Expand Down Expand Up @@ -304,6 +313,7 @@ func NopMetrics() *Metrics {
FullPrevoteMessageDelay: discard.NewGauge(),
ApplicationRejectedProposals: discard.NewCounter(),
TimedOutProposals: discard.NewCounter(),
ABCIMethodTimingSeconds: discard.NewHistogram(),
}
}

Expand Down
Loading