Files
shop/persistence/metrics.go
2019-07-02 13:02:35 +02:00

24 lines
560 B
Go

package persistence
import "github.com/prometheus/client_golang/prometheus"
const (
namespace = "foomo_shop"
subsystemService = "persistor"
)
var (
getCollectionCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: namespace,
Subsystem: subsystemService,
Name: "get_collection_total",
Help: "Counts the number of invocations to 'getCollection (global/standard)' per database and collection.",
}, []string{"db", "collection", "scope"},
)
)
func init() {
prometheus.MustRegister(getCollectionCounter)
}