From 705589bbe130c8f78c63d5a97769d00c6c6619ae Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 29 Aug 2022 18:52:30 +0200 Subject: [PATCH] fix(oohelperd): measurement -> wctask (#906) Make sure we don't say measurement in metrics. See https://github.com/ooni/probe/issues/2183#issuecomment-1230327725 --- internal/cmd/oohelperd/handler.go | 2 +- internal/cmd/oohelperd/metrics.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/oohelperd/handler.go b/internal/cmd/oohelperd/handler.go index 4b3d343..4129210 100644 --- a/internal/cmd/oohelperd/handler.go +++ b/internal/cmd/oohelperd/handler.go @@ -74,7 +74,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, req *http.Request) { elapsed := time.Since(started) metricWCTaskDurationSeconds.Observe(float64(elapsed.Seconds())) if err != nil { - metricRequestsCount.WithLabelValues("400", "measurement_failed").Inc() + metricRequestsCount.WithLabelValues("400", "wctask_failed").Inc() w.WriteHeader(400) return } diff --git a/internal/cmd/oohelperd/metrics.go b/internal/cmd/oohelperd/metrics.go index 73325ce..f8468b2 100644 --- a/internal/cmd/oohelperd/metrics.go +++ b/internal/cmd/oohelperd/metrics.go @@ -27,7 +27,7 @@ var ( // metricWCTaskDurationSeconds summarizes the duration of the web connectivity measurement task. metricWCTaskDurationSeconds = promauto.NewSummary(prometheus.SummaryOpts{ Name: "oohelperd_wctask_duration_seconds", - Help: "Summarizes the time to perform a test-helper measurement (in seconds)", + Help: "Summarizes the time to complete the Web Connectivity measurement task (in seconds)", // See https://grafana.com/blog/2022/03/01/how-summary-metrics-work-in-prometheus/ // // TODO(bassosimone,FedericoCeratto): investigate whether using