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:
parent
42b547d311
commit
705589bbe1
|
@ -74,7 +74,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
elapsed := time.Since(started)
|
elapsed := time.Since(started)
|
||||||
metricWCTaskDurationSeconds.Observe(float64(elapsed.Seconds()))
|
metricWCTaskDurationSeconds.Observe(float64(elapsed.Seconds()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
metricRequestsCount.WithLabelValues("400", "measurement_failed").Inc()
|
metricRequestsCount.WithLabelValues("400", "wctask_failed").Inc()
|
||||||
w.WriteHeader(400)
|
w.WriteHeader(400)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ var (
|
||||||
// metricWCTaskDurationSeconds summarizes the duration of the web connectivity measurement task.
|
// metricWCTaskDurationSeconds summarizes the duration of the web connectivity measurement task.
|
||||||
metricWCTaskDurationSeconds = promauto.NewSummary(prometheus.SummaryOpts{
|
metricWCTaskDurationSeconds = promauto.NewSummary(prometheus.SummaryOpts{
|
||||||
Name: "oohelperd_wctask_duration_seconds",
|
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/
|
// See https://grafana.com/blog/2022/03/01/how-summary-metrics-work-in-prometheus/
|
||||||
//
|
//
|
||||||
// TODO(bassosimone,FedericoCeratto): investigate whether using
|
// TODO(bassosimone,FedericoCeratto): investigate whether using
|
||||||
|
|
Loading…
Reference in New Issue
Block a user