mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
38 lines
746 B
Go
38 lines
746 B
Go
|
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",
|
||
|
},
|
||
|
[]string{"hit"},
|
||
|
)
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
prometheus.MustRegister(
|
||
|
opsCounter,
|
||
|
cacheReadsCounter,
|
||
|
)
|
||
|
}
|