I tend to agree with the referee on this occasion. I believe he was correct in awarding the penalty kick only and not cautioning Carvajal for this incident.
First, let's consider the amount of force used in the tackle.
It's a sliding tackle, that misses the ball
From page 117 of the 2014/15 FIFA Laws of the Game:
“Careless” means that the player has shown a lack of attention or consideration when making a challenge or that he acted without precaution.
- No further disciplinary sanction is needed if a foul is judged to be careless
“Reckless” means that the player has acted with complete disregard to the
danger to, or consequences for, his opponent.
- A player who plays in a reckless manner must be cautioned
“Using excessive force” means that the player has far exceeded the necessary
use of force and is in danger of injuring his opponent.
- A player who uses excessive force must be sent off
Judging from this clip which provides a better angle, you'll see that while there was a slide, the actual foul was an ankle clip made when Carvajal let Tevez slip from a side-to-side position to in front of him. The slide, which occurred after the trip, neither made contact with Tevez nor the ball.
The contact is shown in the following image.

Tevez is already going down from the trip before the slide tackle is executed. Note there is no contact here.

From the reverse angle, we can see that there is no real contact after the initial trip made while standing.

Given this, I believe the referee was correct to consider the trip careless, rather than reckless or excessively forceful.
Next, we need to consider that tactical nature of the challenge.
He is the last defender
On page 130 of the 2014/15 FIFA Laws of the Game, we have the following:
Referees should consider the following circumstances when deciding whether
to send off a player for denying a goal or an obvious goalscoring opportunity:
- the distance between the offence and the goal
- the likelihood of keeping or gaining control of the ball
- the direction of the play
- the location and number of defenders
- the offence which denies an opponent an obvious goalscoring opportunity
may be an offence that incurs a direct free kick or an indirect free kick
While is it true that there is only one opponent (the goalkeeper) between Tevez and the goal, and that this was a direct free kick offence, that's only two of the five points covered here. I'd also argue that the likelihood of keeping or controlling the ball and the distance to goal are also covered, making it four out of five.
However, the direction of play takes Tevez towards the goal line rather than the goal. Since all five criteria aren't met, this isn't considered to be denial of an obvious goalscoring opportunity.
In the following image, I've shown the direction Tevez would have had to be moving to meet this criteria - effectively anywhere between the two blue arrows.

Here is the last touch Tevez takes that changes the direction of his run. While he is not heading directly at goal, if the foul was made here, there's an argument to be made that he still could have adjusted his direction to have an obvious goalscoring opportunity.

However, the next two touches before he is fouled are made in the same direction. By the time the foul is made twenty metres further up the field, there's definitely not enough field left to change direction and still have an angle on goal that gives him an obvious chance of scoring.
On page 123 of the 2014/15 FIFA Laws of the Game:
There are different circumstances when a player must be cautioned for
unsporting behaviour, e.g. if a player:
...
- commits a foul for the tactical purpose of interfering with or breaking up a promising attack
This is a very ambiguous and vague wording. Speaking from refereeing experience, an attack is usually considered to be promising when a player beats one or more defenders into a large amount of space, or there is a pronounced mismatch between attackers and defenders covering while the attackers have possession.
In this situation, Tevez had only 6 - 7 metres of the pitch left in front of him, so there was nowhere left to go.

Furthermore, after the foul, you'll notice that two more defenders have made it into the penalty area before any attackers have arrived - there is no outnumbering, and without anyone to cross it to and having headed towards the goal line instead of the goal with such a small amount of field left, the attack is hardly promising anymore.

This image shows in fact how many defenders there are getting back to cover and the lack of promise in this attack.

Note that an attack isn't promising just because a player has possession in the final third of the field - this would make every penalty kick an automatic caution.
As for Marcelo's caution, it was a much different picture at that stage. There were two attackers to only one outfield player, with a lot of space to break into between them and the goal.
It was a cynical trip made with no purpose other than to turn a two-on-one situation into a one-on-one. I'd say this situation was much more promising and the caution for unsporting behaviour was therefore justified.
