Andrey Meshkov 5690301129 Sync v2.7.0
2024-06-07 14:27:46 +03:00

21 lines
588 B
Go

package metrics
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
// 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,
},
)
}