Skip to content

🐛 Manual session replay unavailable #4397

@paco-spr

Description

@paco-spr

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:

  1. Load the app and start a new session
  2. Trigger manual replay with:
datadogRum.startSessionReplayRecording({ force: true })
  1. Interact with the app for a bit
  2. Stop replay / inspect the resulting session in Datadog
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions