Skip to content

Commit

Permalink
Instrument Flipper with ActiveSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
jibees committed Apr 15, 2021
1 parent 0c182c4 commit 1e0230a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/initializers/flipper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
require "flipper"
require "flipper/adapters/active_record"
require "flipper/instrumentation/log_subscriber"

Flipper.configure do |config|
config.default do
Flipper.new(Flipper::Adapters::ActiveRecord.new)
adapter = Flipper::Adapters::ActiveRecord.new
instrumented = Flipper::Adapters::Instrumented.new(adapter, instrumenter: ActiveSupport::Notifications)
Flipper.new(instrumented, instrumenter: ActiveSupport::Notifications)
end
end
Rails.configuration.middleware.use Flipper::Middleware::Memoizer, preload_all: true
Expand Down

0 comments on commit 1e0230a

Please sign in to comment.