Allow separate sentry dsn for frontend errors

[ci skip]
pull/8341/head
Oliver Günther 5 years ago
parent f4f6f23315
commit 2d7838c26f
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 4
      app/views/layouts/base.html.erb
  2. 4
      lib/open_project/configuration.rb
  3. 7
      lib/open_project/configuration/helpers.rb

@ -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"

@ -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

@ -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

Loading…
Cancel
Save