2022-05-06 03:21:55 -05:00
|
|
|
package manager
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/grafana/grafana/pkg/infra/metrics"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
OpEncrypt = "encrypt"
|
|
|
|
OpDecrypt = "decrypt"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
opsCounter = prometheus.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Namespace: metrics.ExporterName,
|
|
|
|
Name: "encryption_ops_total",
|
|
|
|
Help: "A counter for encryption operations",
|
|
|
|
},
|
|
|
|
[]string{"success", "operation"},
|
|
|
|
)
|
|
|
|
cacheReadsCounter = prometheus.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
|
|
|
Namespace: metrics.ExporterName,
|
|
|
|
Name: "encryption_cache_reads_total",
|
|
|
|
Help: "A counter for encryption cache reads",
|
|
|
|
},
|
2022-05-23 06:13:55 -05:00
|
|
|
[]string{"hit", "method"},
|
2022-05-06 03:21:55 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
prometheus.MustRegister(
|
|
|
|
opsCounter,
|
|
|
|
cacheReadsCounter,
|
|
|
|
)
|
|
|
|
}
|