-
Notifications
You must be signed in to change notification settings - Fork 395
[FFL-1273] bindings for libdatadog datadog ffe api #5001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FFL-1273] bindings for libdatadog datadog ffe api #5001
Conversation
Implements Ruby integration for Feature Flagging & Experimentation (FFE) following ddsketch patterns: - Add native C extension wrapper (ext/libdatadog_api/feature_flags.c) - Create Ruby API with graceful degradation (lib/datadog/core/feature_flags.rb) - Add type signatures and test suite - Register FFE classes in libdatadog_api init
|
Thank you for updating Change log entry section 👏 Visited at: 2025-10-24 15:17:34 UTC |
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 1 untyped method. It increases the percentage of typed methods from 51.13% to 51.29% (+0.16%). Untyped methods (+1-0)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
|
- Updated method names in the C extension and Ruby bindings to include a "_native_" prefix for clarity. - Adjusted initialization methods in the Ruby API to call the renamed native methods. - Removed unnecessary initialization in the Assignment class, as it is now created via the native get_assignment method. - Updated feature flag configuration structure in tests to align with recent changes.
- Integrated crashtracker, process discovery, library configuration, and ddsketch initialization into the core module.
- Add custom build detection to extconf.rb to support platforms without prebuilt libdatadog gem binaries - Include missing headers (common.h, library-config.h) in datadog_ruby_common.h for FFE type definitions - Update setup_ffe.sh to compile Ruby extension with proper cleanup of build artifacts - Skip problematic RSpec tests that have isolation issues in fork environment (functionality works correctly) - Add complete build directory cleanup to setup script
- Fixed ddog_ffe_evaluation_context_new_with_attributes to use AttributePair struct
|
Closing this PR in favor of #5007 |
What does this PR do?
Motivation:
Change log entry
None because this binding is an internal feature (not user-facing). User-facing methods will be from the OpenFeature provider
Additional Notes:
Since
datadog-ffe-ffi(DataDog/libdatadog#1282) hasn't been published yet, you'll need to buildlibdatadoglocally to access the evaluation engine.Prerequisites
cargoandcbindgenpkg-configsystem tool~/dd/(assumes you have~/dd/dd-trace-rband~/dd/libdatadog)To build
libdatadogand test binding indd-trace-rbRun this script.
To clean and retry
How to test the change?