Email scrubbing configuration for Airbrake at Blinkist
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
lib
spec
.gitignore
.rspec
.rubocop.yml
.ruby-version
Gemfile
LICENSE.txt
README.md
Rakefile
blinkist-airbrake-scrubber.gemspec
circle-bak.yml

README.md

Blinkist::AirbrakeScrubber

Blinkist::AirbrakeScrubber provides an Airbrake scrubbing service to remove various sensitive informations from the notifications, e.g. emails. It does not replace Airbrake configuration, but provides some seamless functionality.

Installation

Add this line to your application's Gemfile:

gem "blinkist-airbrake-scrubber"

And then execute:

$ bundle install

Information

Extending the functionality

To extend the functionality, create a new scrubber file in lib/blinkist-airbrake-scrubber/scrubbers folder, like the template:

module Blinkist::AirbrakeScrubber
  class WubbaLubba
    REGEXP = /[\S]+@[\S]+/i

    def self.scrub!
      ::Airbrake.add_filter do |notice|
        # Rainbows and unicorns come here:
        notice[:errors].each { |error| error[:message].gsub!(REGEXP, FILTERED) }
      end
    end # def self.scrub!

  end
end

Then, add the class to Blinkist::AirbrakeScrubber's SCRUBBERS list to have it ran after Airbrake.configure

Dependencies

This gem has dependency on airbrake (~> 7), it will automatically add it unless already bundled.

Maintainers

Special thanks

License

Copyright 2018 Blinks Labs GmbH. http://blinkist.com