From 9f8833baa18ea53e679c74e2a8f859956d582a9f Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 23 Feb 2023 19:44:22 +0800 Subject: [PATCH] config path --- internal/startrpc/start.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/startrpc/start.go b/internal/startrpc/start.go index fc8121ca9..51de09fe0 100644 --- a/internal/startrpc/start.go +++ b/internal/startrpc/start.go @@ -6,7 +6,7 @@ import ( "OpenIM/pkg/common/constant" "OpenIM/pkg/common/log" "OpenIM/pkg/common/middleware" - promePkg "OpenIM/pkg/common/prome" + "OpenIM/pkg/common/prome" "flag" "fmt" "github.com/OpenIMSDK/openKeeper" @@ -39,11 +39,11 @@ func start(rpcPorts []int, rpcRegisterName string, prometheusPorts []int, rpcFn } options = append(options, grpc.UnaryInterceptor(middleware.RpcServerInterceptor)) // ctx 中间件 if config.Config.Prometheus.Enable { - promePkg.NewGrpcRequestCounter() - promePkg.NewGrpcRequestFailedCounter() - promePkg.NewGrpcRequestSuccessCounter() + prome.NewGrpcRequestCounter() + prome.NewGrpcRequestFailedCounter() + prome.NewGrpcRequestSuccessCounter() options = append(options, []grpc.ServerOption{ - // grpc.UnaryInterceptor(promePkg.UnaryServerInterceptorProme), + grpc.UnaryInterceptor(prome.UnaryServerInterceptorPrometheus), grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), grpc.UnaryInterceptor(grpcPrometheus.UnaryServerInterceptor), }...) @@ -55,7 +55,7 @@ func start(rpcPorts []int, rpcRegisterName string, prometheusPorts []int, rpcFn return err } if config.Config.Prometheus.Enable { - err := promePkg.StartPromeSrv(*flagPrometheusPort) + err := prome.StartPromeSrv(*flagPrometheusPort) if err != nil { return err }