Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [RUM-2203] Forward replay records to the bridge #2470

Merged
merged 17 commits into from Mar 5, 2024

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented Oct 18, 2023

Motivation

In order to support webviews for Session Replay, the Browser SDK needs to send Replay records through the event bridge.

Changes

  • Upgrade the bridge interface ( add getPrivacyLevel(), getCapabilities() and add event.id in the send() API)
  • Detect if the bridge supports sending records
  • Send Replay records through the bridge when it is present and the bridge supports records
  • Use the privacy level provided by the bridge when no default privacy level is passed in the init config

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@amortemousque amortemousque force-pushed the aymeric/webview-replay branch 2 times, most recently from f80261a to 7b13ec1 Compare October 19, 2023 14:54
@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.90%. Comparing base (b9ebe46) to head (63d4812).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2470      +/-   ##
==========================================
+ Coverage   92.86%   92.90%   +0.04%     
==========================================
  Files         237      238       +1     
  Lines        6885     6911      +26     
  Branches     1507     1516       +9     
==========================================
+ Hits         6394     6421      +27     
+ Misses        491      490       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Add getPrivacyLevel()
- Send current view id
- If not provided in the init configuration use the bridge privacy level
@amortemousque amortemousque marked this pull request as ready for review January 22, 2024 15:36
@amortemousque amortemousque requested review from a team as code owners January 22, 2024 15:36
@amortemousque amortemousque changed the title [RUM-1596] Replay event bridge POC [RUM-1596] Forward replay records to the bridge Jan 22, 2024
@amortemousque amortemousque changed the title [RUM-1596] Forward replay records to the bridge ✨ [RUM-2203] Forward replay records to the bridge Jan 22, 2024
@amortemousque
Copy link
Contributor Author

/to-staging

@dd-devflow
Copy link

dd-devflow bot commented Jan 23, 2024

🚂 Branch Integration: starting soon, merge in < 0s

Commit b41dba25a5 will soon be integrated into staging-04.

This build is going to start soon! (estimated merge in less than 0s)

Use /to-staging -c to cancel this operation!

dd-mergequeue bot added a commit that referenced this pull request Jan 23, 2024
Co-authored-by: Aymeric Mortemousque <aymeric.mortemousque@datadoghq.com>
@dd-devflow
Copy link

dd-devflow bot commented Jan 23, 2024

🚂 Branch Integration: This commit was successfully integrated

Commit b41dba25a5 has been merged into staging-04 in merge commit 85492e9f00.

Check out the triggered pipeline on Gitlab 🦊

packages/logs/src/transport/startLogsBridge.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/startRecordBridge.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/startRecordBridge.ts Outdated Show resolved Hide resolved
packages/rum-core/src/boot/rumPublicApi.spec.ts Outdated Show resolved Hide resolved
packages/core/src/transport/eventBridge.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/startRecording.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/startRecording.ts Outdated Show resolved Hide resolved
test/e2e/scenario/eventBridge.scenario.ts Show resolved Hide resolved
packages/rum/src/boot/startRecording.ts Outdated Show resolved Hide resolved
packages/rum/src/boot/startRecording.ts Outdated Show resolved Hide resolved
test/e2e/scenario/eventBridge.scenario.ts Outdated Show resolved Hide resolved
packages/core/src/transport/eventBridge.ts Outdated Show resolved Hide resolved
@amortemousque amortemousque force-pushed the aymeric/webview-replay branch 5 times, most recently from a24daf4 to 1578088 Compare February 24, 2024 18:02
@bcaudan
Copy link
Collaborator

bcaudan commented Feb 26, 2024

/to-staging

@dd-devflow
Copy link

dd-devflow bot commented Feb 26, 2024

🚂 Branch Integration: starting soon, merge in < 0s

Commit 681baac5a4 will soon be integrated into staging-09.

This build is going to start soon! (estimated merge in less than 0s)

Use /to-staging -c to cancel this operation!

dd-mergequeue bot added a commit that referenced this pull request Feb 26, 2024
Co-authored-by: Aymeric Mortemousque <aymeric.mortemousque@datadoghq.com>
@dd-devflow
Copy link

dd-devflow bot commented Feb 26, 2024

🚂 Branch Integration: This commit was successfully integrated

Commit 681baac5a4 has been merged into staging-09 in merge commit 58a85353d3.

Check out the triggered pipeline on Gitlab 🦊

@@ -65,7 +72,7 @@ export function startRumSessionManager(
export function startRumSessionManagerStub(): RumSessionManager {
const session: RumSession = {
id: '00000000-aaaa-0000-aaaa-000000000000',
sessionReplayAllowed: false,
sessionReplayAllowed: bridgeSupports(BridgeCapability.RECORDS),
Copy link
Collaborator

Choose a reason for hiding this comment

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

👏 praise: ‏nice!

@amortemousque
Copy link
Contributor Author

/to-staging

@dd-devflow
Copy link

dd-devflow bot commented Mar 5, 2024

🚂 Branch Integration: starting soon, merge in < 9m

Commit 63d4812751 will soon be integrated into staging-10.

This build is going to start soon! (estimated merge in less than 9m)

Use /to-staging -c to cancel this operation!

dd-mergequeue bot added a commit that referenced this pull request Mar 5, 2024
Co-authored-by: Aymeric Mortemousque <aymeric.mortemousque@datadoghq.com>
@dd-devflow
Copy link

dd-devflow bot commented Mar 5, 2024

🚂 Branch Integration: This commit was successfully integrated

Commit 63d4812751 has been merged into staging-10 in merge commit b7b659139e.

Check out the triggered pipeline on Gitlab 🦊

@dd-devflow dd-devflow bot added the staging-10 label Mar 5, 2024
@amortemousque amortemousque merged commit 09d890a into main Mar 5, 2024
18 checks passed
@amortemousque amortemousque deleted the aymeric/webview-replay branch March 5, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants