gitlab-org--gitlab-foss/lib/gitlab/prometheus/metric_group.rb

20 lines
389 B
Ruby
Raw Normal View History

module Gitlab
module Prometheus
class MetricGroup
include ActiveModel::Model
attr_accessor :name, :priority, :metrics
validates :name, :priority, :metrics, presence: true
2018-02-23 12:58:40 -05:00
def self.common_metrics
AdditionalMetricsParser.load_groups_from_yaml
end
2018-02-23 12:58:40 -05:00
# EE only
def self.for_project(_)
common_metrics
end
end
end
end