mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 11:05:59 +08:00
prometheus
This commit is contained in:
@@ -64,3 +64,19 @@ func PromeAdd(counter prometheus.Counter, add int) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func PromeGaugeInc(gauges prometheus.Gauge) {
|
||||
if config.Config.Prometheus.Enable {
|
||||
if gauges != nil {
|
||||
gauges.Inc()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func PromeGaugeDec(gauges prometheus.Gauge) {
|
||||
if config.Config.Prometheus.Enable {
|
||||
if gauges != nil {
|
||||
gauges.Dec()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user