From 61ae9c4c5bc93405617a0a6da25f02e92e1edf1f Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 11 Jun 2018 17:19:51 +0200 Subject: Adjust SQL and transaction Prometheus buckets This allows us to better calculate Apdex scores, instead of having to use the 0.1 and 1.0 buckets. --- changelogs/unreleased/sql-buckets.yml | 5 +++++ lib/gitlab/metrics/subscribers/active_record.rb | 2 +- lib/gitlab/metrics/transaction.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelogs/unreleased/sql-buckets.yml diff --git a/changelogs/unreleased/sql-buckets.yml b/changelogs/unreleased/sql-buckets.yml new file mode 100644 index 00000000000..afb13d5cb20 --- /dev/null +++ b/changelogs/unreleased/sql-buckets.yml @@ -0,0 +1,5 @@ +--- +title: Adjust SQL and transaction Prometheus buckets +merge_request: +author: +type: other diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb index 4b3e8d0a6a0..38f119cf06d 100644 --- a/lib/gitlab/metrics/subscribers/active_record.rb +++ b/lib/gitlab/metrics/subscribers/active_record.rb @@ -20,7 +20,7 @@ module Gitlab define_histogram :gitlab_sql_duration_seconds do docstring 'SQL time' base_labels Transaction::BASE_LABELS - buckets [0.001, 0.01, 0.1, 1.0, 10.0] + buckets [0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0] end def current_transaction diff --git a/lib/gitlab/metrics/transaction.rb b/lib/gitlab/metrics/transaction.rb index f3e48083c19..9f903e96585 100644 --- a/lib/gitlab/metrics/transaction.rb +++ b/lib/gitlab/metrics/transaction.rb @@ -140,7 +140,7 @@ module Gitlab define_histogram :gitlab_transaction_duration_seconds do docstring 'Transaction duration' base_labels BASE_LABELS - buckets [0.001, 0.01, 0.1, 1.0, 10.0] + buckets [0.1, 0.25, 0.5, 1.0, 2.5, 5.0] end define_histogram :gitlab_transaction_allocated_memory_bytes do -- cgit v1.2.1