From 32f22f771a96ee0874e512d5e5bd829e24d7fbe1 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Mon, 13 Nov 2023 19:27:27 -0800 Subject: [PATCH] update usage of otelgrpc methods Signed-off-by: Alex Boten --- .../opencensusreceiver/internal/octrace/opencensus_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/receiver/opencensusreceiver/internal/octrace/opencensus_test.go b/receiver/opencensusreceiver/internal/octrace/opencensus_test.go index 686caafb28d6..dc83c9c988dc 100644 --- a/receiver/opencensusreceiver/internal/octrace/opencensus_test.go +++ b/receiver/opencensusreceiver/internal/octrace/opencensus_test.go @@ -381,9 +381,7 @@ func ocReceiverOnGRPCServer(t *testing.T, sr consumer.Traces, set receiver.Creat require.NoError(t, err, "Failed to create the Receiver: %v", err) // Now run it as a gRPC server - srv := grpc.NewServer( - grpc.UnaryInterceptor(otelgrpc.UnaryServerInterceptor()), - grpc.StreamInterceptor(otelgrpc.StreamServerInterceptor())) + srv := grpc.NewServer(grpc.StatsHandler(otelgrpc.NewServerHandler())) agenttracepb.RegisterTraceServiceServer(srv, oci) go func() { _ = srv.Serve(ln)