Class: Oboe::Reporter

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

Class Method Summary collapse

Class Method Details

.sendReport(evt) ⇒ Object



37
38
39
# File 'lib/heroku_metal.rb', line 37

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

.startObject

Initialize the Oboe Context, reporter and report the initialization



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/heroku_metal.rb', line 14

def self.start
  begin
    return unless Oboe.loaded

    if Oboe.reporter
      Oboe.logger.warn "[oboe/warn] Attempt to start an already started reporter..."
      return
    end

    Oboe_metal::Context.init()

    Oboe.logger.debug "[oboe/debug] Initializing Heroku based reporter."

    # The Oboe Reporter is configured via Heroku config variables.
    Oboe.reporter = Oboe_metal::Reporter.new(nil, nil)

    Oboe::API.report_init
  rescue Exception => e
    $stderr.puts e.message
    raise
  end
end