Files
traces/pkg/util/log/experimental.go
MarioandGitHub 06690cd855 Prefix metric namespaces with tempo instead of cortex (#2204)
* Prefix metric namespaces with tempo instead of cortex

* Remove cortex_ prefixed metrics

* Mark breaking change
2023-04-11 10:12:55 +02:00

22 lines
630 B
Go

package log
import (
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var experimentalFeaturesInUse = promauto.NewCounter(
prometheus.CounterOpts{
Namespace: "tempo",
Name: "experimental_features_in_use_total",
Help: "The number of experimental features in use.",
},
)
// WarnExperimentalUse logs a warning and increments the experimental features metric.
func WarnExperimentalUse(feature string) {
level.Warn(Logger).Log("msg", "experimental feature in use", "feature", feature)
experimentalFeaturesInUse.Inc()
}