Initialize http_requests_total label values

What does this MR do?

Move http method/status initilaization from the http_requests_duration_seconds histogram to the http_requests_total counter. This is required to track error rates and error ratios.

For example, the ratio of 5xx requests to all requests.

sum(rate(http_requests_total{status=~"5.."}[5m])
/
sum(rate(http_requests_total[5m])

Without the inialization, there would be no values for 5xx on small or low traffic servers. This would lead to blank graphs.

gitlab-com/gl-infra/scalability#585

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Mark Chao

Merge request reports

Loading