Filter airbrake parameters
As Rails does with the application log and other tools. We are going to use the same filtering rules we use in Consul Democracy. We are renaming the initializer file name `filter_parameter_logging.rb` so it's loaded before the errbit initializer.
This commit is contained in:
@@ -16,6 +16,8 @@ Airbrake.configure do |config|
|
||||
config.job_stats = false
|
||||
config.query_stats = false
|
||||
config.remote_config = false
|
||||
|
||||
config.blocklist_keys = Rails.application.config.filter_parameters
|
||||
end
|
||||
|
||||
Airbrake.add_filter do |notice|
|
||||
|
||||
7
spec/airbrake_spec.rb
Normal file
7
spec/airbrake_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe "Airbrake" do
|
||||
it "uses the same filtering rules that Consul Democracy" do
|
||||
expect(Airbrake::Config.instance.blocklist_keys).to eq Rails.application.config.filter_parameters
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user