Files
open-im-server/pkg/common/prommetrics/gin_api.go
T

17 lines
449 B
Go
Raw Normal View History

package prommetrics
2023-11-07 14:36:56 +08:00
import ginProm "github.com/openimsdk/open-im-server/v3/pkg/common/ginprometheus"
2023-11-07 14:36:56 +08:00
/*
labels := prometheus.Labels{"label_one": "any", "label_two": "value"}
ApiCustomCnt.MetricCollector.(*prometheus.CounterVec).With(labels).Inc()
*/
var (
ApiCustomCnt = &ginProm.Metric{
Name: "custom_total",
Description: "Custom counter events.",
Type: "counter_vec",
Args: []string{"label_one", "label_two"},
}
)