✨ implement remote configuration async loading & caching#4606
Open
gogusarov wants to merge 4 commits into
Open
✨ implement remote configuration async loading & caching#4606gogusarov wants to merge 4 commits into
gogusarov wants to merge 4 commits into
Conversation
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: df72f91 | Docs | Datadog PR Page | Give us feedback! |
gogusarov
commented
May 12, 2026
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
8a5af9b to
5bef505
Compare
gogusarov
commented
May 13, 2026
Collaborator
|
can you edit the PR title to follow our convention please! |
2a0d867 to
3c37331
Compare
3c37331 to
df72f91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Support remote configuration asynchronous loading & caching mechanism according to the RFC
Changes
Added async remote configuration fetching flow where config isn't awaited during
DD_RUM.initbut read synchronously from a versioned localStorage cache (dd_rc_<remoteConfigurationId>) and applied on the same page load. A background fetch runs in parallel and refreshes the cache for the next page load, so updates roll out one load late but startup is unblocked. Cache outcomes (hit/miss/error) and fetch outcomes (success/failure) are reported via the existing telemetry metrics. Unit tests cover the new cache module and the read/apply/fetch flow; the e2e scenarios were rewritten to wait for the cache to be populated and reload the page before asserting.Blocking fetch flow was kept for backward compatibility with existing customer setup
New init configuration API
remoteConfiguration: { id: string; sync?: boolean }— new top-level field.Default behavior is async (cache-and-reload). Pass
sync: trueto opt into thelegacy blocking fetch through the new API.
remoteConfigurationId: string— legacy field preserved for backwardcompatibility with existing customer setups. Always triggers the blocking fetch
flow.
Test instructions
remote-config.jsonfile to sandbox directoryDD_RUM.initaddingremoteConfiguration: { id: 'remote-config-test' },remoteConfigurationProxy: '/remote-config.json'DD_RUM.getInitConfiguration()returns initial configuration on the first page loadDD_RUM.getInitConfiguration()returns remote configuration on the second page loadChecklist