mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-06-22 09:12:28 +00:00
metrics interceptors: fix default server registration
metrics interceptors: add missing client histogram methods Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@ -110,7 +110,7 @@ func run(opts ...service.Option) {
|
||||
ready := make(chan struct{})
|
||||
var svc service.Service
|
||||
var err error
|
||||
metrics := metrics2.NewInterceptors()
|
||||
metrics := metrics2.DefaultInterceptors()
|
||||
validation := validation2.NewInterceptors(true)
|
||||
defaulter := defaulter.NewInterceptors()
|
||||
address := "0.0.0.0:9991"
|
||||
@ -156,6 +156,7 @@ func run(opts ...service.Option) {
|
||||
panic(err)
|
||||
}
|
||||
RegisterGreeterServer(svc, &GreeterHandler{})
|
||||
metrics.EnableHandlingTimeHistogram()
|
||||
metrics.Register(svc)
|
||||
go func() {
|
||||
if err := svc.Start(); err != nil {
|
||||
|
Reference in New Issue
Block a user