OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/config/initializers/appsignal.rb

47 lines
1.2 KiB

require 'open_project/version'
require_relative '../../lib_static/open_project/appsignal'
if OpenProject::Appsignal.enabled?
require 'appsignal'
OpenProject::Application.configure do |app|
config = {
active: true,
name: ENV.fetch('APPSIGNAL_NAME'),
push_api_key: ENV.fetch('APPSIGNAL_KEY'),
revision: OpenProject::VERSION.to_s,
ignore_actions: [
'OkComputer::OkComputerController#show',
'OkComputer::OkComputerController#index'
],
ignore_errors: [
'Grape::Exceptions::MethodNotAllowed',
'ActionController::UnknownFormat',
'ActiveJob::DeserializationError',
'Net::SMTPServerBusy'
]
}
if ENV['APPSIGNAL_DEBUG'] == 'true'
config[:log] = 'stdout'
config[:debug] = true
config[:log_level] = 'debug'
end
Appsignal.config = Appsignal::Config.new(
Rails.root,
Rails.env,
config
)
app.middleware.insert_after(
ActionDispatch::DebugExceptions,
Appsignal::Rack::RailsInstrumentation
)
# Extend the core log delegator
handler = ::OpenProject::Appsignal.method(:exception_handler)
::OpenProject::Logging::LogDelegator.register(:appsignal, handler)
Appsignal.start
end
end