Class: RSpec::Trace::OpenTelemetryFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/rspec/trace/open_telemetry_formatter.rb

Instance Method Summary collapse

Methods inherited from Formatter

#example_failed, #example_group_finished, #example_group_started, #example_passed, #example_pending, #example_started, #start

Constructor Details

#initialize(output) ⇒ OpenTelemetryFormatter

Returns a new instance of OpenTelemetryFormatter.



17
18
19
20
# File 'lib/rspec/trace/open_telemetry_formatter.rb', line 17

def initialize(output)
  @process = Subprocess::Process.new(["rspec-trace-consumer"], {stdin: Subprocess::PIPE})
  super(@process.stdin)
end

Instance Method Details

#stop(notification) ⇒ Object



22
23
24
25
26
# File 'lib/rspec/trace/open_telemetry_formatter.rb', line 22

def stop(notification)
  super(notification)

  @process.wait
end