Make Identity use GRPC Server with Prom Metrics (#3457)

* make identity use grpc server with prom metrics

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* linting fix

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
This commit is contained in:
Tarun Pothulapati 2019-09-23 20:47:41 +05:30 committed by Thomas Rampelberg
parent 49d39e5a12
commit 139c64132d
1 changed files with 2 additions and 2 deletions

View File

@ -17,9 +17,9 @@ import (
"github.com/linkerd/linkerd2/pkg/identity"
"github.com/linkerd/linkerd2/pkg/k8s"
consts "github.com/linkerd/linkerd2/pkg/k8s"
"github.com/linkerd/linkerd2/pkg/prometheus"
"github.com/linkerd/linkerd2/pkg/tls"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc"
)
// TODO watch trustAnchorsPath for changes
@ -118,7 +118,7 @@ func Main(args []string) {
log.Fatalf("Failed to listen on %s: %s", *addr, err)
}
srv := grpc.NewServer()
srv := prometheus.NewGrpcServer()
identity.Register(srv, svc)
go func() {
log.Infof("starting gRPC server on %s", *addr)