Class: Jaeger::Reporters::LoggingReporter
- Inherits:
-
Object
- Object
- Jaeger::Reporters::LoggingReporter
- Defined in:
- lib/jaeger/reporters/logging_reporter.rb
Instance Method Summary collapse
-
#initialize(logger: Logger.new($stdout)) ⇒ LoggingReporter
constructor
A new instance of LoggingReporter.
- #report(span) ⇒ Object
Constructor Details
#initialize(logger: Logger.new($stdout)) ⇒ LoggingReporter
Returns a new instance of LoggingReporter.
6 7 8 |
# File 'lib/jaeger/reporters/logging_reporter.rb', line 6 def initialize(logger: Logger.new($stdout)) @logger = logger end |
Instance Method Details
#report(span) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jaeger/reporters/logging_reporter.rb', line 10 def report(span) span_info = { operation_name: span.operation_name, start_time: span.start_time.iso8601, end_time: span.end_time.iso8601, trace_id: span.context.to_trace_id, span_id: span.context.to_span_id } @logger.info "Span reported: #{span_info}" end |