Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Revert "Upgrade appsignal to 4.2"

Markus Kahl74c257145a85
diff --git a/Gemfile b/Gemfile
index bc673e74dcf..582fc47827c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -218,7 +218,7 @@ gem "dry-validation"
gem "store_attribute", "~> 1.0"
# Appsignal integration
-gem "appsignal", "~> 4.2", require: false
+gem "appsignal", "~> 3.10.0", require: false
gem "view_component"
# Lookbook
diff --git a/Gemfile.lock b/Gemfile.lock
index 45bcbbd0277..47d3cd0cc25 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -335,8 +335,7 @@ GEM
airbrake-ruby (6.2.2)
rbtree3 (~> 0.6)
android_key_attestation (0.3.0)
- appsignal (4.2.0)
- logger
+ appsignal (3.10.0)
rack
ast (2.4.2)
attr_required (1.0.2)
@@ -1209,7 +1208,7 @@ DEPENDENCIES
acts_as_tree (~> 2.9.0)
addressable (~> 2.8.0)
airbrake (~> 13.0.0)
- appsignal (~> 4.2)
+ appsignal (~> 3.10.0)
auto_strip_attributes (~> 2.5)
awesome_nested_set (~> 3.7.0)
aws-sdk-core (~> 3.107)
diff --git a/config/initializers/appsignal.rb b/config/initializers/appsignal.rb
index 4159de1e877..7a7c9fee84e 100644
--- a/config/initializers/appsignal.rb
+++ b/config/initializers/appsignal.rb
@@ -3,53 +3,56 @@ require_relative "../../lib_static/open_project/appsignal"
if OpenProject::Appsignal.enabled?
require "appsignal"
-
Rails.application.configure do |app|
- app.middleware.insert_after(
- ActionDispatch::DebugExceptions,
- Appsignal::Rack::RailsInstrumentation
- )
- end
-
- Appsignal.configure do |config|
- config.active = true
- config.name = ENV.fetch("APPSIGNAL_NAME")
- config.push_api_key = ENV.fetch("APPSIGNAL_KEY")
- config.revision = OpenProject::VERSION.to_s
+ 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",
+ "GET::API::V3::Notifications::NotificationsAPI",
+ "GET::API::V3::Notifications::NotificationsAPI#/notifications/"
+ ],
+ ignore_errors: [
+ "Grape::Exceptions::MethodNotAllowed",
+ "ActionController::UnknownFormat",
+ "ActiveJob::DeserializationError",
+ "Net::SMTPServerBusy"
+ ],
+ ignore_logs: [
+ "GET /health_check"
+ ]
+ }
if ENV["APPSIGNAL_DEBUG"] == "true"
- config.log = "stdout"
- config.log_level = "debug"
+ config[:log] = "stdout"
+ config[:debug] = true
+ config[:log_level] = "debug"
end
- config.ignore_actions = [
- "OkComputer::OkComputerController#show",
- "OkComputer::OkComputerController#index",
- "GET::API::V3::Notifications::NotificationsAPI",
- "GET::API::V3::Notifications::NotificationsAPI#/notifications/"
- ]
+ Appsignal.config = Appsignal::Config.new(
+ Rails.root,
+ Rails.env,
+ config
+ )
- config.ignore_errors = [
- "Grape::Exceptions::MethodNotAllowed",
- "ActionController::UnknownFormat",
- "ActiveJob::DeserializationError",
- "Net::SMTPServerBusy"
- ]
+ app.middleware.insert_after(
+ ActionDispatch::DebugExceptions,
+ Appsignal::Rack::RailsInstrumentation
+ )
- config.ignore_logs = [
- "GET /health_check"
- ]
- end
+ # Extend the core log delegator
+ handler = OpenProject::Appsignal.method(:exception_handler)
+ OpenProject::Logging::LogDelegator.register(:appsignal, handler)
- # Extend the core log delegator
- handler = OpenProject::Appsignal.method(:exception_handler)
- OpenProject::Logging::LogDelegator.register(:appsignal, handler)
+ # Send our logs to appsignal
+ if OpenProject::Appsignal.logging_enabled?
+ appsignal_logger = Appsignal::Logger.new("rails")
+ Rails.logger.broadcast_to(appsignal_logger)
+ end
- # Send our logs to appsignal
- if OpenProject::Appsignal.logging_enabled?
- appsignal_logger = Appsignal::Logger.new("rails")
- Rails.logger.broadcast_to(appsignal_logger)
+ Appsignal.start
end
-
- Appsignal.start
end