From 2beca5e19b3244be179a9d0fd213796973b7c51f Mon Sep 17 00:00:00 2001 From: Nahue Date: Mon, 13 Jan 2025 16:38:15 -0300 Subject: [PATCH] feat: adding a Summary type in metrics package --- metrics/metrics.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/metrics/metrics.go b/metrics/metrics.go index a7ba1b1fe..c376adc4b 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -23,3 +23,12 @@ type Histogram interface { With(labelValues ...string) Histogram Observe(value float64) } + +// Summary describes a metric that provides a statistical summary of observations, +// focusing on quantiles and percentiles. An example is tracking HTTP response times, +// allowing for analysis of performance metrics. The Summary interface enables +// collection of observations with associated label values. +type Summary interface { + With(labelValues ...string) Summary + Observe(value float64) +} \ No newline at end of file