21 lines
588 B
Go
Raw Permalink Normal View History

2023-02-03 15:27:58 +03:00
package metrics
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
2024-06-07 14:27:46 +03:00
// ExperimentGauge returns the gauge used to inform about running experiments.
func ExperimentGauge(constLabels prometheus.Labels) (g prometheus.Gauge) {
return promauto.NewGauge(
prometheus.GaugeOpts{
Name: "experiment_enabled",
Namespace: namespace,
Subsystem: subsystemResearch,
Help: `A metric with a constant value of 1 labeled by experiments that are available ` +
`and enabled.`,
ConstLabels: constLabels,
},
)
2023-02-03 15:27:58 +03:00
}