Class: OpenTelemetry::SDK::Metrics::Export::ConsoleMetricPullExporter
- Inherits:
-
MetricReader
- Object
- MetricReader
- OpenTelemetry::SDK::Metrics::Export::ConsoleMetricPullExporter
- Defined in:
- lib/opentelemetry/sdk/metrics/export/console_metric_pull_exporter.rb
Overview
Outputs MetricData to the console
Potentially useful for exploratory purposes.
Instance Attribute Summary
Attributes inherited from MetricReader
Instance Method Summary collapse
- #export(metrics, timeout: nil) ⇒ Object
- #force_flush(timeout: nil) ⇒ Object
-
#initialize ⇒ ConsoleMetricPullExporter
constructor
A new instance of ConsoleMetricPullExporter.
- #pull ⇒ Object
- #shutdown(timeout: nil) ⇒ Object
Methods inherited from MetricReader
Constructor Details
#initialize ⇒ ConsoleMetricPullExporter
Returns a new instance of ConsoleMetricPullExporter.
15 16 17 18 |
# File 'lib/opentelemetry/sdk/metrics/export/console_metric_pull_exporter.rb', line 15 def initialize super @stopped = false end |
Instance Method Details
#export(metrics, timeout: nil) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/opentelemetry/sdk/metrics/export/console_metric_pull_exporter.rb', line 24 def export(metrics, timeout: nil) return FAILURE if @stopped Array(metrics).each { |metric| pp metric } SUCCESS end |
#force_flush(timeout: nil) ⇒ Object
32 33 34 |
# File 'lib/opentelemetry/sdk/metrics/export/console_metric_pull_exporter.rb', line 32 def force_flush(timeout: nil) SUCCESS end |
#pull ⇒ Object
20 21 22 |
# File 'lib/opentelemetry/sdk/metrics/export/console_metric_pull_exporter.rb', line 20 def pull export(collect) end |
#shutdown(timeout: nil) ⇒ Object
36 37 38 39 |
# File 'lib/opentelemetry/sdk/metrics/export/console_metric_pull_exporter.rb', line 36 def shutdown(timeout: nil) @stopped = true SUCCESS end |