summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2015-12-10 17:48:14 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2015-12-17 17:25:48 +0100
commit09a311568abee739fae0c2577a9cf6aa01516977 (patch)
treea7fbb356ca2f1adf57e7238c8c5d91ebdad623ce /lib
parent6dc25ad58c7bf2218cdda6d60061111a5365affb (diff)
downloadgitlab-ce-09a311568abee739fae0c2577a9cf6aa01516977.tar.gz
Track object count types as tags
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/metrics/sampler.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/metrics/sampler.rb b/lib/gitlab/metrics/sampler.rb
index 141953dc985..03afa6324dd 100644
--- a/lib/gitlab/metrics/sampler.rb
+++ b/lib/gitlab/metrics/sampler.rb
@@ -53,7 +53,9 @@ module Gitlab
end
def sample_objects
- @metrics << Metric.new('object_counts', ObjectSpace.count_objects)
+ ObjectSpace.count_objects.each do |type, count|
+ @metrics << Metric.new('object_counts', { count: count }, type: type)
+ end
end
def sample_gc