⚗️ Add canvas recording init configuration - #4947
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 3a2a2d7 | Docs | Datadog PR Page | Give us feedback! |
Bundles Sizes Evolution
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 066a0c36d2
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4845699db1
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e132ae585
ℹ️ 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".
1e132ae to
1bc1fbf
Compare
3ec079f to
3a2a2d7
Compare
Motivation
Prepare the Browser SDK configuration surface for Session Replay canvas recording while keeping the capability behind an experimental feature flag. Grouping canvas recording settings in an object leaves room for future controls such as maximum image size or compression type without adding more top-level initialization parameters. Keeping
enableseparate from the related settings also allows canvas recording to be toggled without losing values such as the configured maximum FPS.Design references:
Changes
Add the hidden
sessionReplayCanvasRecordingRUM initialization object with this shape:Require
enableso canvas recording can be explicitly enabled or disabled while preserving related settings.Default
maxFramesPerSecondto 1 FPS and validate it at runtime as a finite number in the inclusive range[0, 5]. Setting it to0disables canvas frame recording.Require both
sessionReplayCanvasRecording.enable: trueand thesession_replay_record_canvasexperimental feature flag for recording to be effective.Keep canvas recording disabled when the configuration object is omitted or the experimental feature is unavailable.
Add a reusable finite
numberfield to the js-core configuration schema, with optional inclusiveminandmaxbounds.Update the js-core API report and add focused unit coverage for defaults, custom frame rates, enabled and disabled states, feature gating, missing required fields, and invalid option shapes.
Test instructions
yarn test:unit --spec packages/js-core/src/entries/configuration.spec.ts --spec packages/browser-rum-core/src/domain/configuration/configuration.spec.tsyarn typecheckyarn api:checkChecklist