mirror of
https://github.com/3ybactuk/marketplace-go-service-project.git
synced 2025-10-30 05:53:45 +03:00
17 lines
387 B
Go
17 lines
387 B
Go
package metrics
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
)
|
|
|
|
var inMemoryObjectsGauge = promauto.NewGauge(prometheus.GaugeOpts{
|
|
Namespace: "app",
|
|
Name: "inmemory_repo_objects",
|
|
Help: "Current in-memory repository size",
|
|
})
|
|
|
|
func SetInMemoryObjects(n int) {
|
|
inMemoryObjectsGauge.Set(float64(n))
|
|
}
|