Class: OpenTelemetry::SDK::Trace::Export::ConsoleSpanExporter
- Inherits:
-
Object
- Object
- OpenTelemetry::SDK::Trace::Export::ConsoleSpanExporter
- Defined in:
- lib/opentelemetry/sdk/trace/export/console_span_exporter.rb
Overview
Outputs SpanData to the console.
Potentially useful for exploratory purposes.
Instance Method Summary collapse
- #export(spans, timeout: nil) ⇒ Object
- #force_flush(timeout: nil) ⇒ Object
-
#initialize ⇒ ConsoleSpanExporter
constructor
A new instance of ConsoleSpanExporter.
- #shutdown(timeout: nil) ⇒ Object
Constructor Details
#initialize ⇒ ConsoleSpanExporter
Returns a new instance of ConsoleSpanExporter.
15 16 17 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 15 def initialize @stopped = false end |
Instance Method Details
#export(spans, timeout: nil) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 19 def export(spans, timeout: nil) return FAILURE if @stopped Array(spans).each { |s| pp s } SUCCESS end |
#force_flush(timeout: nil) ⇒ Object
27 28 29 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 27 def force_flush(timeout: nil) SUCCESS end |
#shutdown(timeout: nil) ⇒ Object
31 32 33 34 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 31 def shutdown(timeout: nil) @stopped = true SUCCESS end |