Skip to content

Session replay: early chunks saved under the wrong session #537

Closed

Description

@rjocoleman

If you send events from another pipeline with a stable __deviceId, for example to match session recordings to a session tracked through a CDP, the first replay chunks end up under a different session from the events

Replay chunks recorded before the first track response have no sessionId, so the SDK queues them. When the session arrives, flush() sends them as they are (buildFlushPayload returns replay payloads unchanged), and the server falls back to the session it works out from IP and user agent. Usually that's the same session. With __deviceId set, it isn't. The early chunks, including the full snapshot, are stored under a second session, and the replay of the real session starts without a snapshot

Repro: enable session replay, send a track with properties.__deviceId set to a stable id, then check session_replay_chunks. The early chunks have a different session_id from the event

Activity

  1. changed the title [-]Session replay: chunks recorded before the session opens are filed under a different session[/-] [+]Session replay: early chunks saved under the wrong session[/+] on Oct 9, 2026
  2. mrfambo commented on Oct 18, 2026

    @mrfambo

    Use EXPERIMENTAL_PROFILE_BACKFILL: "1"

  3. added a commit that references this issue on Nov 3, 2026
    b6e84dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions