lib/elastic_apm/railtie.rb in elastic-apm-2.3.0 vs lib/elastic_apm/railtie.rb in elastic-apm-2.3.1

- old
+ new

@@ -8,11 +8,11 @@ config.elastic_apm = ActiveSupport::OrderedOptions.new Config::DEFAULTS.each { |option, value| config.elastic_apm[option] = value } initializer 'elastic_apm.initialize' do |app| - config = app.config.elastic_apm.merge(app: app).tap do |c| + config = Config.new(app.config.elastic_apm.merge(app: app)).tap do |c| # Prepend Rails.root to log_path if present if c.log_path && !c.log_path.start_with?('/') c.log_path = Rails.root.join(c.log_path) end end @@ -25,10 +25,10 @@ app.middleware.insert 0, Middleware end rescue StandardError => e config.alert_logger.error format('Failed to start: %s', e.message) - config.alert_logger.debug e.backtrace.join("\n") + config.alert_logger.debug "Backtrace:\n" + e.backtrace.join("\n") end end config.after_initialize do require 'elastic_apm/spies/action_dispatch'