From f2cbd4169156a391020e6153984bb9a687ae4c5b Mon Sep 17 00:00:00 2001 From: Flavien Darche Date: Thu, 12 Dec 2024 15:54:39 +0100 Subject: [PATCH] update to register the service --- .../go-control-plane/cmd/serviceextensions/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/envoyproxy/go-control-plane/cmd/serviceextensions/main.go b/contrib/envoyproxy/go-control-plane/cmd/serviceextensions/main.go index 81cf003cb7..856bd54666 100644 --- a/contrib/envoyproxy/go-control-plane/cmd/serviceextensions/main.go +++ b/contrib/envoyproxy/go-control-plane/cmd/serviceextensions/main.go @@ -13,7 +13,7 @@ import ( "os" "strconv" - "gopkg.in/DataDog/dd-trace-go.v1/contrib/envoyproxy/go-control-plane" + gocontrolplane "gopkg.in/DataDog/dd-trace-go.v1/contrib/envoyproxy/go-control-plane" "gopkg.in/DataDog/dd-trace-go.v1/internal/log" "gopkg.in/DataDog/dd-trace-go.v1/internal/version" @@ -140,11 +140,12 @@ func StartGPRCSsl(service extproc.ExternalProcessorServer, config serviceExtensi return } - si := go_control_plane.StreamServerInterceptor() grpcCredentials := credentials.NewServerTLSFromCert(&cert) - grpcServer := grpc.NewServer(grpc.StreamInterceptor(si), grpc.Creds(grpcCredentials)) + grpcServer := grpc.NewServer(grpc.Creds(grpcCredentials)) - extproc.RegisterExternalProcessorServer(grpcServer, service) + appsecEnvoyExternalProcessorServer := gocontrolplane.AppsecEnvoyExternalProcessorServer(service) + + extproc.RegisterExternalProcessorServer(grpcServer, appsecEnvoyExternalProcessorServer) reflection.Register(grpcServer) if err := grpcServer.Serve(lis); err != nil { log.Error("service_extension: error starting gRPC server: %v\n", err)