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

Allow separate sentry dsn for frontend errors

Oliver Günther2d7838c26f77
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index bf792056e28..ab6f5f8fcf8 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -53,8 +53,8 @@ See docs/COPYRIGHT.rdoc for more details.
data-id="<%= User.current.id %>" />
<% end %>
- <% if OpenProject::Configuration.frontend_sentry? %>
- <%= tag :meta, name: 'openproject_sentry', data: { dsn: OpenProject::Configuration.sentry_dsn } %>
+ <% if OpenProject::Configuration.sentry_frontend_dsn %>
+ <%= tag :meta, name: 'openproject_sentry', data: { dsn: OpenProject::Configuration.sentry_frontend_dsn } %>
<% end %>
<meta name="openproject_initializer"
diff --git a/lib/open_project/configuration.rb b/lib/open_project/configuration.rb
index 8d44b920446..df24762bc23 100644
--- a/lib/open_project/configuration.rb
+++ b/lib/open_project/configuration.rb
@@ -165,8 +165,8 @@ module OpenProject
# Log errors to sentry instance
'sentry_dsn' => nil,
- # Allow error reporting for frontend errors
- 'sentry_report_js' => false,
+ # Allow separate error reporting for frontend errors
+ 'sentry_frontend_dsn' => nil,
'sentry_host' => 'https://sentry.openproject.com',
# Allow connection to Augur
diff --git a/lib/open_project/configuration/helpers.rb b/lib/open_project/configuration/helpers.rb
index 536bcf3a5fc..39502138446 100644
--- a/lib/open_project/configuration/helpers.rb
+++ b/lib/open_project/configuration/helpers.rb
@@ -92,13 +92,6 @@ module OpenProject
self['edition'] == 'bim'
end
- ##
- # Whether we want to report to sentry
- def frontend_sentry?
- self['sentry_dsn'].present? && sentry_report_js?
- end
-
-
def available_file_uploaders
uploaders = {
file: ::LocalFileUploader