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