diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-05-25 15:01:10 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-05-25 16:05:56 +0300 |
commit | 61d7b7f117ff090f34f882918d55691575d76e55 (patch) | |
tree | 064745920950677723e9c1f1c840d392f8277d1b /lib/gitlab/prometheus/queries/matched_metrics_query.rb | |
parent | 2061414054ce43aa6d53d1be3f602114e5a336d2 (diff) |
Finalize refactoring additional metrics query
Diffstat (limited to 'lib/gitlab/prometheus/queries/matched_metrics_query.rb')
-rw-r--r-- | lib/gitlab/prometheus/queries/matched_metrics_query.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/prometheus/queries/matched_metrics_query.rb b/lib/gitlab/prometheus/queries/matched_metrics_query.rb index 61926320e40..5a8b0f6c701 100644 --- a/lib/gitlab/prometheus/queries/matched_metrics_query.rb +++ b/lib/gitlab/prometheus/queries/matched_metrics_query.rb @@ -2,10 +2,6 @@ module Gitlab::Prometheus::Queries class MatchedMetricsQuery < BaseQuery MAX_QUERY_ITEMS = 40.freeze - def self.metrics - @metrics ||= YAML.load_file(Rails.root.join('config/additional_metrics.yml')).map(&:deep_symbolize_keys) - end - def query groups_data.map do |group, data| { @@ -17,6 +13,8 @@ module Gitlab::Prometheus::Queries end end + private + def groups_data metrics_series = metrics_with_series(Gitlab::Prometheus::MetricGroup.all) lookup = active_series_lookup(metrics_series) |