This commit is contained in:
wangchuxiao
2022-09-15 08:45:10 +08:00
parent c1a94a1b6c
commit 144cf279f9
11 changed files with 51 additions and 13 deletions
+3
View File
@@ -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...)