fix(openfeature): keep provider stable across RC updates#9359
Conversation
Overall package sizeSelf size: 6.77 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 35d627f | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9359 +/- ##
=======================================
Coverage 96.64% 96.64%
=======================================
Files 923 923
Lines 122844 122860 +16
Branches 20989 21055 +66
=======================================
+ Hits 118723 118741 +18
+ Misses 4121 4119 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-07-14 23:49:38 Comparing candidate commit 35d627f in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2316 metrics, 42 unstable metrics.
|
|
Closing in favor of #9331 |
What does this PR do?
Keep
tracer.openfeaturestable after the real FlaggingProvider is installed. The OpenFeature registration now skips recreating the provider during later tracing reconfiguration while still enabling the OpenFeature module.Motivation
I ran into this issue in https://github.com/DataDog/ffe-dogfooding/pull/94 where the provider appeared stuck in a not-ready state.
Apps can bind OpenFeature to
tracer.openfeaturebefore Remote Config delivers flag configuration. A laterAPM_TRACINGRemote Config update reran#updateTracing(), recreatedtracer.openfeature, and causedFFE_FLAGSupdates to target the new provider while the app remained bound to the old one. That left the bound provider without configuration and required app-level polling such aswaitForTracerOpenFeatureProvider(see example here).This keeps the provider instance that OpenFeature binds to as the same instance that receives
FFE_FLAGSconfiguration updates.Additional Notes
Validated with:
./node_modules/.bin/mocha packages/dd-trace/test/proxy.spec.jsnpm run test:openfeatureFull
npm run lint -- ...currently stops before ESLint because the localvendor/node_modulestree has existing invalid dependency versions reported by the license check.