You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ca...@apache.org on 2023/02/06 05:38:14 UTC

[brpc] branch master updated: add avg latency for prometheus metrics

This is an automated email from the ASF dual-hosted git repository.

caidj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 50f87179 add avg latency for prometheus metrics
     new d810d0c8 Merge pull request #2024 from Huixxi/avg-latency
50f87179 is described below

commit 50f87179011ae494d497b24c2c597d9f9b4e820c
Author: XiguoHu <hu...@baidu.com>
AuthorDate: Mon Nov 28 14:45:35 2022 +0800

    add avg latency for prometheus metrics
---
 src/brpc/builtin/prometheus_metrics_service.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/brpc/builtin/prometheus_metrics_service.cpp b/src/brpc/builtin/prometheus_metrics_service.cpp
index f7948221..7bf8bbf3 100644
--- a/src/brpc/builtin/prometheus_metrics_service.cpp
+++ b/src/brpc/builtin/prometheus_metrics_service.cpp
@@ -172,6 +172,8 @@ bool PrometheusMetricsDumper::DumpLatencyRecorderSuffix(
          << si->latency_percentiles[4] << '\n'
          << si->metric_name << "{quantile=\"1\"} "
          << si->latency_percentiles[5] << '\n'
+         << si->metric_name << "{quantile=\"avg\"} "
+         << si->latency_avg << '\n'
          << si->metric_name << "_sum "
          // There is no sum of latency in bvar output, just use
          // average * count as approximation


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org