mirror of
https://github.com/AdguardTeam/AdGuardDNS.git
synced 2025-02-20 11:23:36 +08:00
21 lines
588 B
Go
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,
|
|
},
|
|
)
|
|
}
|