I'm downvoting all the comments about "my country" without saying which country that is.
No useful discussion can result from comments like this.
No useful discussion can result from comments like this.
In this case Spain hasn't done anything wrong (the data gathering for the id cards was done before entering the EU and complies with EU's regulations[0]). Other EU countries gather less or more data according to their specific legislations.
The country in question here is the UK and, to a lesser extent, the US. Specifics about other EU countries are, IMHO, irrelevant.
[0] Another question, for a different discussion, is if they should record all that data.