mirror of
https://github.com/publiclab/mapknitter.git
synced 2025-12-05 16:00:00 +01:00
moved sentry config to /config/initializers/sentry.rb (#1723)
This commit is contained in:
@@ -52,21 +52,5 @@ module Mapknitter
|
|||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
config.assets.paths << Rails.root.join("public","lib")
|
config.assets.paths << Rails.root.join("public","lib")
|
||||||
|
|
||||||
Sentry.init do |config|
|
|
||||||
config.environment = ENV["COMPOSE_PROJECT_NAME"] || ENV["RAILS_ENV"] || %w(production)
|
|
||||||
config.enabled_environments = %w[production, mapknitter_stable, mapknitter_unstable]
|
|
||||||
config.breadcrumbs_logger = [:sentry_logger, :http_logger]
|
|
||||||
# To activate performance monitoring, set one of these options.
|
|
||||||
# We recommend adjusting the value in production:
|
|
||||||
config.traces_sample_rate = 0.5
|
|
||||||
# use Rails' parameter filter to sanitize the event payload:
|
|
||||||
# for Rails 6+:
|
|
||||||
# filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
|
|
||||||
# for Rails 5:
|
|
||||||
filter = ActionDispatch::Http::ParameterFilter.new(Rails.application.config.filter_parameters)
|
|
||||||
config.before_send = lambda do |event, hint|
|
|
||||||
filter.filter(event.to_hash)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
16
config/initializers/sentry.rb
Normal file
16
config/initializers/sentry.rb
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
Sentry.init do |config|
|
||||||
|
config.environment = ENV["COMPOSE_PROJECT_NAME"] || ENV["RAILS_ENV"] || %w(production)
|
||||||
|
config.enabled_environments = %w[production, mapknitter_stable, mapknitter_unstable]
|
||||||
|
config.breadcrumbs_logger = [:sentry_logger, :http_logger]
|
||||||
|
# To activate performance monitoring, set one of these options.
|
||||||
|
# We recommend adjusting the value in production:
|
||||||
|
config.traces_sample_rate = 0.5
|
||||||
|
# use Rails' parameter filter to sanitize the event payload:
|
||||||
|
# for Rails 6+:
|
||||||
|
# filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
|
||||||
|
# for Rails 5:
|
||||||
|
filter = ActionDispatch::Http::ParameterFilter.new(Rails.application.config.filter_parameters)
|
||||||
|
config.before_send = lambda do |event, hint|
|
||||||
|
filter.filter(event.to_hash)
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user