summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-06-11 17:19:51 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2018-06-11 19:18:02 +0200
commit61ae9c4c5bc93405617a0a6da25f02e92e1edf1f (patch)
tree0730fe92fce384b175ca36f50b9fd8d796e62b2d
parent87eb2b6e510af44ec905c183d9b886a46d223815 (diff)
downloadgitlab-ce-sql-buckets.tar.gz
Adjust SQL and transaction Prometheus bucketssql-buckets
This allows us to better calculate Apdex scores, instead of having to use the 0.1 and 1.0 buckets.
-rw-r--r--changelogs/unreleased/sql-buckets.yml5
-rw-r--r--lib/gitlab/metrics/subscribers/active_record.rb2
-rw-r--r--lib/gitlab/metrics/transaction.rb2
3 files changed, 7 insertions, 2 deletions
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