Class: Gitlab::Prometheus::Metric

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/gitlab/prometheus/metric.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Metric

Returns a new instance of Metric.


12
13
14
15
# File 'lib/gitlab/prometheus/metric.rb', line 12

def initialize(params = {})
  super(params)
  @y_label ||= 'Values'
end

Instance Attribute Details

#idObject

Returns the value of attribute id.


8
9
10
# File 'lib/gitlab/prometheus/metric.rb', line 8

def id
  @id
end

#queriesObject

Returns the value of attribute queries.


8
9
10
# File 'lib/gitlab/prometheus/metric.rb', line 8

def queries
  @queries
end

#required_metricsObject

Returns the value of attribute required_metrics.


8
9
10
# File 'lib/gitlab/prometheus/metric.rb', line 8

def required_metrics
  @required_metrics
end

#titleObject

Returns the value of attribute title.


8
9
10
# File 'lib/gitlab/prometheus/metric.rb', line 8

def title
  @title
end

#weightObject

Returns the value of attribute weight.


8
9
10
# File 'lib/gitlab/prometheus/metric.rb', line 8

def weight
  @weight
end

#y_labelObject

Returns the value of attribute y_label.


8
9
10
# File 'lib/gitlab/prometheus/metric.rb', line 8

def y_label
  @y_label
end