Class: OpenTelemetry::SDK::Metrics::Aggregation::Drop
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Metrics::Aggregation::Drop
- Defined in:
- lib/opentelemetry/sdk/metrics/aggregation/drop.rb
Overview
Contains the implementation of the Drop aggregation
Instance Attribute Summary collapse
-
#aggregation_temporality ⇒ Object
readonly
Returns the value of attribute aggregation_temporality.
Instance Method Summary collapse
- #collect(start_time, end_time, data_points) ⇒ Object
-
#initialize(aggregation_temporality: :delta) ⇒ Drop
constructor
A new instance of Drop.
- #update(increment, attributes, data_points) ⇒ Object
Constructor Details
#initialize(aggregation_temporality: :delta) ⇒ Drop
Returns a new instance of Drop.
15 16 17 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/drop.rb', line 15 def initialize(aggregation_temporality: :delta) @aggregation_temporality = aggregation_temporality end |
Instance Attribute Details
#aggregation_temporality ⇒ Object (readonly)
Returns the value of attribute aggregation_temporality.
13 14 15 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/drop.rb', line 13 def aggregation_temporality @aggregation_temporality end |
Instance Method Details
#collect(start_time, end_time, data_points) ⇒ Object
19 20 21 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/drop.rb', line 19 def collect(start_time, end_time, data_points) data_points.values.map!(&:dup) end |
#update(increment, attributes, data_points) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/drop.rb', line 23 def update(increment, attributes, data_points) data_points[attributes] = NumberDataPoint.new( {}, 0, 0, 0, 0 ) nil end |