Class: OpenTelemetry::SDK::Metrics::Aggregation::AggregationTemporality
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Metrics::Aggregation::AggregationTemporality
- Defined in:
- lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb
Overview
AggregationTemporality represents the temporality of data point (NumberDataPoint and HistogramDataPoint) in OpenTelemetry::SDK::Metrics. It determine whether the data point will be cleared for each metrics pull/export.
Constant Summary collapse
- DELTA =
delta: data point will be cleared after each metrics pull/export.
:delta
- CUMULATIVE =
cumulative: data point will NOT be cleared after metrics pull/export.
:cumulative
Instance Attribute Summary collapse
-
#temporality ⇒ Object
readonly
Returns the value of attribute temporality.
Class Method Summary collapse
-
.cumulative ⇒ AggregationTemporality
Returns a newly created AggregationTemporality with temporality == CUMULATIVE.
-
.delta ⇒ AggregationTemporality
Returns a newly created AggregationTemporality with temporality == DELTA.
Instance Method Summary collapse
- #cumulative? ⇒ Boolean
- #delta? ⇒ Boolean
-
#initialize(temporality) ⇒ AggregationTemporality
constructor
private
The constructor is private and only for use internally by the class.
Constructor Details
#initialize(temporality) ⇒ AggregationTemporality
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The constructor is private and only for use internally by the class. Users should use the delta and cumulative factory methods to obtain a OpenTelemetry::SDK::Metrics::Aggregation::AggregationTemporality instance.
41 42 43 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb', line 41 def initialize(temporality) @temporality = temporality end |
Instance Attribute Details
#temporality ⇒ Object (readonly)
Returns the value of attribute temporality.
33 34 35 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb', line 33 def temporality @temporality end |
Class Method Details
.cumulative ⇒ AggregationTemporality
Returns a newly created OpenTelemetry::SDK::Metrics::Aggregation::AggregationTemporality with temporality == CUMULATIVE
28 29 30 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb', line 28 def cumulative new(CUMULATIVE) end |
.delta ⇒ AggregationTemporality
Returns a newly created OpenTelemetry::SDK::Metrics::Aggregation::AggregationTemporality with temporality == DELTA
21 22 23 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb', line 21 def delta new(DELTA) end |
Instance Method Details
#cumulative? ⇒ Boolean
49 50 51 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb', line 49 def cumulative? @temporality == :cumulative end |
#delta? ⇒ Boolean
45 46 47 |
# File 'lib/opentelemetry/sdk/metrics/aggregation/aggregation_temporality.rb', line 45 def delta? @temporality == :delta end |