Add endpoint actors for feature flag targeting
What does this MR do and why?
Add endpoint actors for feature flag targeting. This allows us to directly connect feature flag enablement with code path execution via Kibana.
Introduce Feature::Endpoint actor class to enable targeting feature flags to specific API endpoints, controller actions, or background jobs based on their caller_id from ApplicationContext.
Key features:
- Feature.endpoint(caller_id) creates endpoint actors
- Feature.current_endpoint gets endpoint for current request
- Preserves exact caller_id format from Kibana for easy copy-paste
- Works with all feature flag operations (enable/disable/opt_out)
Example usage:
# Copy caller_id directly from Kibana
Feature.enable(:my_flag, Feature.endpoint('GET /api/v4/projects/:id'))
# Check if enabled for current request
Feature.enabled?(:my_flag, Feature.current_endpoint)
# Opt-out specific endpoint from global rollout
Feature.enable(:expensive_feature)
Feature.opt_out(:expensive_feature, Feature.endpoint('GET /api/v4/projects/:id'))
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.