mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
envoy: use envoy request id for logging across systems with http and gRPC (#691)
This commit is contained in:
parent
593c47f8ac
commit
41855e5419
16 changed files with 228 additions and 253 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/requestid"
|
||||
)
|
||||
|
||||
type versionedOptions struct {
|
||||
|
@ -58,7 +59,10 @@ func NewServer() (*Server, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
srv.GRPCServer = grpc.NewServer()
|
||||
srv.GRPCServer = grpc.NewServer(
|
||||
grpc.UnaryInterceptor(requestid.UnaryServerInterceptor()),
|
||||
grpc.StreamInterceptor(requestid.StreamServerInterceptor()),
|
||||
)
|
||||
reflection.Register(srv.GRPCServer)
|
||||
srv.registerXDSHandlers()
|
||||
srv.registerAccessLogHandlers()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue