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:
Senén Rodero Rodríguez
2023-11-17 14:02:48 +01:00
parent e0aee199e4
commit 1e46746d6a
3 changed files with 9 additions and 0 deletions

View File

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