Class: PerformanceMonitoring::PrometheusMetric

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/performance_monitoring/prometheus_metric.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id


7
8
9
# File 'app/models/performance_monitoring/prometheus_metric.rb', line 7

def id
  @id
end

#labelObject

Returns the value of attribute label


7
8
9
# File 'app/models/performance_monitoring/prometheus_metric.rb', line 7

def label
  @label
end

#queryObject

Returns the value of attribute query


7
8
9
# File 'app/models/performance_monitoring/prometheus_metric.rb', line 7

def query
  @query
end

#query_rangeObject

Returns the value of attribute query_range


7
8
9
# File 'app/models/performance_monitoring/prometheus_metric.rb', line 7

def query_range
  @query_range
end

#unitObject

Returns the value of attribute unit


7
8
9
# File 'app/models/performance_monitoring/prometheus_metric.rb', line 7

def unit
  @unit
end

Class Method Details

.from_json(json_content) ⇒ Object


14
15
16
# File 'app/models/performance_monitoring/prometheus_metric.rb', line 14

def from_json(json_content)
  build_from_hash(json_content).tap(&:validate!)
end