Allow recording error rates in Gitlab::Metrics::Sli

In &525 we started by adding a framework to define SLIs in the application. The first thing we needed this for was the rails_request_apdex with a customizable duration.

Our sli definition tooling in the runbooks repository separates an error and apdex component:

  • apdex is dealt with as a success ratio: higher is better 100% is best
  • error is dealt with as an error ratio: lower is better, 0% is best

To capture the error component of an SLI, we currently have no support in the setup in Gitlab::Metrics::Sli or the runbooks side of this. But having that would allow us to record more granular information on errors for endpoints.