Closed imjoehaines closed 1 year ago
This PR adds support for feature flags to Bugsnag-ruby
The new APIs are available on both the Bugsnag module and invidiual events (via on_error callbacks):
Bugsnag
on_error
add_feature_flag
Declare a single feature flag or experiment with variant as an optional second parameter.
Bugsnag.add_feature_flag('Checkout button color', 'Blue') Bugsnag.add_feature_flag('New checkout flow')
add_feature_flags
Declare multiple feature flags or experiments.
Bugsnag.add_feature_flags( [ Bugsnag::FeatureFlag.new('Checkout button color', 'Blue') Bugsnag::FeatureFlag.new('New checkout flow') ] )
If add_feature_flags is called again, the new data will be merged with any existing feature flags with the newer variant values taking precedence.
clear_feature_flag
Remove a single feature flag or experiment.
Bugsnag.clear_feature_flag('Checkout button color')
clear_feature_flags
Remove all feature flags and experiments.
Bugsnag.clear_feature_flags
Goal
This PR adds support for feature flags to Bugsnag-ruby
The new APIs are available on both the
Bugsnag
module and invidiual events (viaon_error
callbacks):add_feature_flag
Declare a single feature flag or experiment with variant as an optional second parameter.
add_feature_flags
Declare multiple feature flags or experiments.
If
add_feature_flags
is called again, the new data will be merged with any existing feature flags with the newer variant values taking precedence.clear_feature_flag
Remove a single feature flag or experiment.
clear_feature_flags
Remove all feature flags and experiments.