Class: OpenTelemetry::SDK::Metrics::Export::MetricReader
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Metrics::Export::MetricReader
- Defined in:
- lib/opentelemetry/sdk/metrics/export/metric_reader.rb
Overview
MetricReader provides a minimal example implementation. It is not required to subclass this class to provide an implementation of MetricReader, provided the interface is satisfied.
Direct Known Subclasses
ConsoleMetricPullExporter, InMemoryMetricPullExporter, PeriodicMetricReader
Instance Attribute Summary collapse
-
#metric_store ⇒ Object
readonly
Returns the value of attribute metric_store.
Instance Method Summary collapse
- #collect ⇒ Object
- #force_flush(timeout: nil) ⇒ Object
-
#initialize ⇒ MetricReader
constructor
A new instance of MetricReader.
- #shutdown(timeout: nil) ⇒ Object
Constructor Details
#initialize ⇒ MetricReader
Returns a new instance of MetricReader.
17 18 19 |
# File 'lib/opentelemetry/sdk/metrics/export/metric_reader.rb', line 17 def initialize @metric_store = OpenTelemetry::SDK::Metrics::State::MetricStore.new end |
Instance Attribute Details
#metric_store ⇒ Object (readonly)
Returns the value of attribute metric_store.
15 16 17 |
# File 'lib/opentelemetry/sdk/metrics/export/metric_reader.rb', line 15 def metric_store @metric_store end |
Instance Method Details
#collect ⇒ Object
21 22 23 |
# File 'lib/opentelemetry/sdk/metrics/export/metric_reader.rb', line 21 def collect @metric_store.collect end |