Class: Chillout::CustomAdvancedMetric

Inherits:
Object
  • Object
show all
Defined in:
lib/chillout/custom_advanced_metric.rb

Instance Method Summary collapse

Constructor Details

#initialize(series:, tags:, timestamp:, values:) ⇒ CustomAdvancedMetric

Returns a new instance of CustomAdvancedMetric.



4
5
6
7
8
9
# File 'lib/chillout/custom_advanced_metric.rb', line 4

def initialize(series:, tags:, timestamp:, values:)
  @series = series.to_str
  @tags = tags.to_h
  @timestamp = timestamp.utc
  @values = values.to_h
end

Instance Method Details

#as_measurementsObject



11
12
13
14
15
16
17
18
# File 'lib/chillout/custom_advanced_metric.rb', line 11

def as_measurements()
  [{
    series: @series,
    tags: @tags,
    timestamp: @timestamp,
    values: @values,
  }]
end