Skip to content

✨[RUM-10962][Remote config] support js strategy#3766

Merged
bcaudan merged 13 commits intomainfrom
bcaudan/remote-config6
Sep 12, 2025
Merged

✨[RUM-10962][Remote config] support js strategy#3766
bcaudan merged 13 commits intomainfrom
bcaudan/remote-config6

Conversation

@bcaudan
Copy link
Collaborator

@bcaudan bcaudan commented Aug 7, 2025

Motivation

Support resolving a remote configuration option to a js variable value by using a simple JSON path.

Changes

  • implements a simple JSON path parser supporting:
    • dot notation
    • bracket notation
    • array exact index
  • support retrieving value from a js variable

Test instructions

No backend to test the new options yet

Checklist

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

@bcaudan bcaudan force-pushed the bcaudan/remote-config6 branch from 1cab81c to bf779ef Compare August 8, 2025 13:32
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Aug 8, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 98.99%
Total Coverage: 92.65% (+0.38%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 081ac90 | Docs | Was this helpful? Give us feedback!

@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Aug 8, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 155.93 KiB 157.43 KiB 1.50 KiB 0.96%
Rum Recorder 19.53 KiB 19.53 KiB 0 B 0.00%
Rum Profiler 5.18 KiB 5.18 KiB 0 B 0.00%
Logs 55.12 KiB 55.12 KiB 0 B 0.00%
Flagging N/A 931 B 931 B N/A%
Rum Slim 113.80 KiB 115.30 KiB 1.49 KiB 1.31%
Worker 23.60 KiB 23.60 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.008 0.008 0.001
addaction 0.023 0.028 0.005
addtiming 0.006 0.004 -0.002
adderror 0.021 0.017 -0.004
startstopsessionreplayrecording 0.001 0.001 -0.000
startview 0.009 0.005 -0.003
logmessage 0.025 0.023 -0.002
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 24.96 KiB 25.67 KiB 727 B
addaction 45.73 KiB 45.38 KiB -358 B
addtiming 24.70 KiB 24.93 KiB 235 B
adderror 51.53 KiB 51.61 KiB 86 B
startstopsessionreplayrecording 24.71 KiB 24.12 KiB -604 B
startview 423.36 KiB 428.31 KiB 4.95 KiB
logmessage 42.11 KiB 42.41 KiB 308 B

🔗 RealWorld

@bcaudan bcaudan force-pushed the bcaudan/remote-config5 branch from d2f02aa to 006d9a7 Compare August 27, 2025 12:52
@bcaudan bcaudan force-pushed the bcaudan/remote-config6 branch 2 times, most recently from 5d0b321 to be71bfc Compare August 28, 2025 13:17
Base automatically changed from bcaudan/remote-config5 to main September 1, 2025 12:53
@bcaudan bcaudan force-pushed the bcaudan/remote-config6 branch from be71bfc to fa484b2 Compare September 2, 2025 08:21
@bcaudan bcaudan force-pushed the bcaudan/remote-config6 branch from fa484b2 to 06fe14f Compare September 2, 2025 08:23
@bcaudan bcaudan marked this pull request as ready for review September 2, 2025 13:13
@bcaudan bcaudan requested a review from a team as a code owner September 2, 2025 13:13
@bcaudan bcaudan force-pushed the bcaudan/remote-config6 branch 2 times, most recently from 9738c5a to 9936cf2 Compare September 10, 2025 15:50
@bcaudan bcaudan force-pushed the bcaudan/remote-config6 branch from 9936cf2 to 081ac90 Compare September 10, 2025 15:51
@bcaudan bcaudan merged commit d2834c8 into main Sep 12, 2025
20 checks passed
@bcaudan bcaudan deleted the bcaudan/remote-config6 branch September 12, 2025 11:52
rgaignault pushed a commit that referenced this pull request Sep 15, 2025
* ♻️ factorize extractor

* ✨add simple JSON path parser

* ✨add js strategy support

* ⬆️ synchronize remote configuration schema

* 👌remove unneeded cast

* 👌add extra comments

* 👌replace sets by lists

* 👌use String.raw to avoid quote juggling

* 👌some renamings

* 👌remove useless types

* 👌rework namings

* 🐛fix escaping logic
mormubis added a commit that referenced this pull request 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>
mormubis added a commit that referenced this pull request Feb 4, 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>
mormubis added a commit that referenced this pull request Feb 12, 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.

3 participants