envoy: Add GRPC stats handler to control plane service (#744)

* Add GRPC stats handler to control plane service
This commit is contained in:
Travis Groth 2020-05-20 22:26:34 -04:00 committed by GitHub
parent 84378440f0
commit 66e4c7d7ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,7 @@ import (
"github.com/pomerium/pomerium/config"
"github.com/pomerium/pomerium/internal/log"
"github.com/pomerium/pomerium/internal/telemetry/metrics"
"github.com/pomerium/pomerium/internal/telemetry/requestid"
)
@ -60,6 +61,7 @@ func NewServer() (*Server, error) {
return nil, err
}
srv.GRPCServer = grpc.NewServer(
grpc.StatsHandler(metrics.NewGRPCServerStatsHandler("control_plane")),
grpc.UnaryInterceptor(requestid.UnaryServerInterceptor()),
grpc.StreamInterceptor(requestid.StreamServerInterceptor()),
)