Class: OpenTelemetry::SDK::Metrics::Aggregation::Drop

Inherits:
Object
  • Object
show all
Defined in:
lib/opentelemetry/sdk/metrics/aggregation/drop.rb

Overview

Contains the implementation of the Drop aggregation

Instance Method Summary collapse

Instance Method Details

#collect(start_time, end_time, data_points) ⇒ Object



13
14
15
# File 'lib/opentelemetry/sdk/metrics/aggregation/drop.rb', line 13

def collect(start_time, end_time, data_points)
  data_points.values.map!(&:dup)
end

#update(increment, attributes, data_points) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/opentelemetry/sdk/metrics/aggregation/drop.rb', line 17

def update(increment, attributes, data_points)
  data_points[attributes] = NumberDataPoint.new(
    {},
    0,
    0,
    0,
    0
  )
  nil
end