Module: Atatus::Grape
Overview
Module for starting the Atatus agent and hooking into Grape.
Instance Method Summary collapse
-
#start(app, config = {}) ⇒ true?
Start the Atatus agent and hook into Grape.
Instance Method Details
#start(app, config = {}) ⇒ true?
Start the Atatus agent and hook into Grape.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/atatus/grape.rb', line 32 def start(app, config = {}) config = Config.new(config) unless config.is_a?(Config) configure_app(app, config) Atatus.start(config).tap do |agent| attach_subscriber(agent) end Atatus.running? rescue StandardError => e config.logger.error format('Failed to start: %s', e.) config.logger.debug "Backtrace:\n" + e.backtrace.join("\n") end |