Skip to content

Conversation

@mormubis
Copy link
Contributor

@mormubis mormubis commented Jan 9, 2026

Motivation

Remote configuration does not support localStorage, which is beneficial for some customers.

Changes

This PR adds the localStorage strategy for remote configuration.

Test instructions

TBD

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Jan 9, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 167.98 KiB 168.20 KiB +225 B +0.13%
Rum Profiler 4.32 KiB 4.32 KiB 0 B 0.00%
Rum Recorder 24.54 KiB 24.54 KiB 0 B 0.00%
Logs 56.25 KiB 56.25 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 124.88 KiB 125.09 KiB +225 B +0.18%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance

Pending...

🧠 Memory Performance

Pending...

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 9, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 6 Tests failed

remote configuration › should handle localStorage access failure gracefully › async from rum/remoteConfiguration.scenario.ts (Datadog) (Fix with Cursor)
createTest.ts:244:3 async

[chromium] › ../lib/framework/createTest.ts:244:3 › remote configuration › should handle localStorage access failure gracefully › async 

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: "fallback-version"
    Received: undefined

       at rum/remoteConfiguration.scenario.ts:180
...
remote configuration › should handle localStorage access failure gracefully › bundle from rum/remoteConfiguration.scenario.ts (Datadog) (Fix with Cursor)
createTest.ts:244:3 bundle

[chromium] › ../lib/framework/createTest.ts:244:3 › remote configuration › should handle localStorage access failure gracefully › bundle 

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: "fallback-version"
    Received: undefined

       at rum/remoteConfiguration.scenario.ts:180
...
remote configuration › should handle localStorage access failure gracefully › npm from rum/remoteConfiguration.scenario.ts (Datadog) (Fix with Cursor)
createTest.ts:244:3 npm

[chromium] › ../lib/framework/createTest.ts:244:3 › remote configuration › should handle localStorage access failure gracefully › npm 

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: "fallback-version"
    Received: undefined

       at rum/remoteConfiguration.scenario.ts:180
...
View all

ℹ️ Info

❄️ No new flaky tests detected

🎯 Code Coverage
Patch Coverage: 50.00%
Overall Coverage: 77.22% (-0.03%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1b8e852 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@mormubis mormubis force-pushed the adlrb/remote-config-localstorage branch from 9e8e512 to 94d9a59 Compare January 30, 2026 09:10
@mormubis
Copy link
Contributor Author

@codex review

@DataDog DataDog deleted a comment from chatgpt-codex-connector bot Jan 30, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94d9a591b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mormubis mormubis changed the title feat: add localStorage strategy to remote config localStorage strategy for remote configuration Feb 2, 2026
Add 4 new E2E tests for the localStorage strategy:
1. Basic localStorage retrieval - reads simple string values
2. localStorage with regex extractor - parses extracted values
3. Missing key handling - gracefully falls back when key doesn't exist
4. localStorage unavailable - handles access errors and falls back

Tests follow the same pattern as the js strategy tests (PR #3766) and validate:
- Synchronous value resolution during SDK initialization
- Regex extraction functionality
- Fallback behavior for missing or inaccessible keys
- Integration with both CDN and npm setups

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants