Skip to content

Adjust gitlab_database_transaction_seconds bucket

Quang-Minh Nguyen requested to merge qmnguyen0711/expand-a-histogram-bucket into master

What does this MR do?

gitlab_database_transaction_seconds was added in 56ae34e4. In that commit, we used the default bucket of Prometheus. In a following up MR (!56005 (merged)), that metric was forced to use the same bucket with other histograms in the same observer, accidentally. It makes the histogram inaccurately recorded, especially for the transactions hanging more than 250ms.

This MR is to adjust the bucket of gitlab_database_transaction_seconds. As we care about the transaction if it hangs for a while, I removed the bottom end of the default bucket. The bucket now becomes [0.05, 0.25, 1, 2.5, 5, 10]. When looking at the current average transaction duration, this bucket seems to be reasonable:

Screen_Shot_2021-03-18_at_17.40.27

Screenshots (strongly suggested)

Screen_Shot_2021-03-18_at_17.57.00

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

Merge request reports

Loading