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)