fix(oohelperd): measurement -> wctask (#906)

Make sure we don't say measurement in metrics.

See https://github.com/ooni/probe/issues/2183#issuecomment-1230327725
This commit is contained in:
Simone Basso 2022-08-29 18:52:30 +02:00 committed by GitHub
parent 42b547d311
commit 705589bbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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