Class: Oboe_metal::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/oboe_metal.rb

Class Method Summary collapse

Class Method Details

.sendReport(evt) ⇒ Object



63
64
65
# File 'lib/oboe_metal.rb', line 63

def self.sendReport(evt)
  Oboe.reporter.sendReport(evt)
end

.startObject

Initialize the Oboe Context, reporter and report the initialization



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/oboe_metal.rb', line 43

def self.start
  return unless Oboe.loaded

  begin
    Oboe_metal::Context.init() 

    if ENV['RACK_ENV'] == "test"
      Oboe.reporter = Oboe::FileReporter.new("/tmp/trace_output.bson")
    else
      Oboe.reporter = Oboe::UdpReporter.new(Oboe::Config[:reporter_host])
    end

    Oboe::API.report_init('rack') unless ["development", "test"].include? ENV['RACK_ENV']
  
  rescue Exception => e
    $stderr.puts e.message
    raise
  end
end