Describe the bug
We’re trying to support random replay sampling plus a user-triggered “record this bug now” flow via startSessionReplayRecording({ force: true }).
When startSessionReplayRecordingManually is unset:
- replay data is ingested
session.has_replay = true
- but the session/view is still marked unavailable in Datadog
When we explicitly set startSessionReplayRecordingManually: true, manual replay works.
SDK version:
@datadog/browser-rum: 6.30.1
@datadog/browser-logs: 6.30.1
We tested these scenarios:
sessionReplaySampleRate |
sessionSampleRate |
startSessionReplayRecordingManually |
Outcome |
1 |
100 |
unset |
broken |
100 |
100 |
unset |
works |
1 |
100 |
true |
works |
Details:
1 / 100 / unset: replay segments are ingested, but the session/view are still marked unavailable
100 / 100 / unset: automatic replay works, as long as we do not use the manual replay button
1 / 100 / true: manual replay works
This makes it look like startSessionReplayRecording({ force: true }) is not producing a replayable session/view unless manual replay mode is explicitly enabled.
Observed session metadata for affected sessions:
session.has_replay = true
session.is_replay_available = false
session.has_full_snapshot = false
- replay stats present
_dd.initial_view_with_replay.id present
_dd.session.has_view_marked_as_replay = false
Affected examples:
- Session:
db53f823-c8eb-460e-8f84-18e49f7ef911
- Session:
0747d073-4103-4be7-9e6e-daaac3647f32
- View:
8d9306cf-e555-4621-88a5-172f3205fa21
To Reproduce
Steps to reproduce the behavior:
Initialize:
datadogRum.init({
...,
sessionSampleRate: 100,
sessionReplaySampleRate: 1,
// startSessionReplayRecordingManually is unset
})
Then:
- Load the app and start a new session
- Trigger manual replay with:
datadogRum.startSessionReplayRecording({ force: true })
- Interact with the app for a bit
- Stop replay / inspect the resulting session in Datadog
- Open the session replay or replay tab for the recorded session/view
Expected behavior
We expect random replay sampling to continue working normally, and startSessionReplayRecording({ force: true }) to make the current session replayable when a user explicitly triggers recording, even when startSessionReplayRecordingManually is unset. Instead, replay data is ingested but the resulting session/view is still marked unavailable.
Describe the bug
We’re trying to support random replay sampling plus a user-triggered “record this bug now” flow via
startSessionReplayRecording({ force: true }).When
startSessionReplayRecordingManuallyis unset:session.has_replay = trueWhen we explicitly set
startSessionReplayRecordingManually: true, manual replay works.SDK version:
@datadog/browser-rum:6.30.1@datadog/browser-logs:6.30.1We tested these scenarios:
sessionReplaySampleRatesessionSampleRatestartSessionReplayRecordingManually11001001001100trueDetails:
1 / 100 / unset: replay segments are ingested, but the session/view are still marked unavailable100 / 100 / unset: automatic replay works, as long as we do not use the manual replay button1 / 100 / true: manual replay worksThis makes it look like
startSessionReplayRecording({ force: true })is not producing a replayable session/view unless manual replay mode is explicitly enabled.Observed session metadata for affected sessions:
session.has_replay = truesession.is_replay_available = falsesession.has_full_snapshot = false_dd.initial_view_with_replay.idpresent_dd.session.has_view_marked_as_replay = falseAffected examples:
db53f823-c8eb-460e-8f84-18e49f7ef9110747d073-4103-4be7-9e6e-daaac3647f328d9306cf-e555-4621-88a5-172f3205fa21To Reproduce
Steps to reproduce the behavior:
Initialize:
Then:
Expected behavior
We expect random replay sampling to continue working normally, and
startSessionReplayRecording({ force: true })to make the current session replayable when a user explicitly triggers recording, even whenstartSessionReplayRecordingManuallyis unset. Instead, replay data is ingested but the resulting session/view is still marked unavailable.