Add metrics for transaction aborts

Moved from GitHub dgraph/5780

Posted by danielmai:

Experience Report

Note: Feature requests are judged based on user experience and modeled on Go Experience Reports. These reports should focus on the problems: they should not focus on and need not propose solutions.

What you wanted to do

I want to know how many txn aborts have happened in the cluster. This should be a metric coming out of Dgraph metrics.

What you actually did

Right now, the only way to do so is to track it myself from the client.

Why that wasn’t great, with examples

This requires me to be proactive about tracking txn aborts in a separate place.