mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 09:05:59 +08:00
prome
This commit is contained in:
@@ -69,6 +69,9 @@ func (rpc *rpcChat) Run() {
|
||||
|
||||
var grpcOpts []grpc.ServerOption
|
||||
if config.Config.Prometheus.Enable {
|
||||
promePkg.NewGrpcRequestCounter()
|
||||
promePkg.NewGrpcRequestFailedCounter()
|
||||
promePkg.NewGrpcRequestSuccessCounter()
|
||||
grpcOpts = append(grpcOpts, grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme))
|
||||
}
|
||||
srv := grpc.NewServer(grpcOpts...)
|
||||
|
||||
Reference in New Issue
Block a user