Skip to content

Instantly share code, notes, and snippets.

Last active December 16, 2022 14:06
What would you like to do?
Flipper + BugSnag feature flags
# config/initializers/flipper.rb
ActiveSupport::Notifications.subscribe('feature_operation.flipper') do |event|
operation, feature_name, result = event.payload.values_at(:operation, :feature_name, :result)
return unless operation == :enabled?
result ? Bugsnag.add_feature_flag(feature_name) : Bugsnag.clear_feature_flag(feature_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment