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
-
#initialize ⇒ ConsoleSpanExporter
constructor
A new instance of ConsoleSpanExporter.
- #shutdown(timeout: nil) ⇒ Object
Constructor Details
#initialize ⇒ ConsoleSpanExporter
Returns a new instance of ConsoleSpanExporter.
17 18 19 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 17 def initialize @stopped = false end |
Instance Method Details
#export(spans, timeout: nil) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 21 def export(spans, timeout: nil) return FAILURE if @stopped Array(spans).each { |s| pp s } SUCCESS end |
#shutdown(timeout: nil) ⇒ Object
29 30 31 32 |
# File 'lib/opentelemetry/sdk/trace/export/console_span_exporter.rb', line 29 def shutdown(timeout: nil) @stopped = true SUCCESS end |