Back to Sentry

Replays SDK Event

src/sentry/replays/blueprints/recording_consumer.md

26.6.03.5 KB
Original Source

Replays SDK Event

This file defines the contract between the recording consumer and its producers. All messages are transmitted as msgpack encoded bytes. Messages smaller than 1MB in size are processed as one message. Their structure is defined in the "Small Recordings" section. All other message types are defined in the "Large Recordings" section.

Authors: @cmanallen

Small Recordings

Replay Recording Not Chunked

ColumnTypeDescription
typestringLiteral: replay_recording_not_chunked
replay_idstring-
key_idOptonal[int]-
org_idint-
project_idint-
receivedintUnix timestamp of when the event was received
payloadbytesJSON encoded headers are prefixed to the payload.
  • Request (application/octet-stream)

    python
    {
      "type": "replay_recording_not_chunked",
      "replay_id": "515539018c9b4260a6f999572f1661ee",
      "key_id": 1,
      "org_id": 132,
      "project_id": 10459681,
      "received": 1342632621,
      "payload": b"{'segment_id': 0}\n\x14ftypqt\x00\x00\x00\x00qt\x00\x00x08wide\x03\xbdd\x11mdat"
    }
    

Large Recordings

Replay Recording Chunk

ColumnTypeDescription
typestringLiteral: replay_recording_chunk
replay_idstring-
project_idint-
chunk_indexint-
idstring-
payloadbytes-
  • Request (application/octet-stream)

    python
    {
      "type": "replay_recording_chunk",
      "replay_id": "515539018c9b4260a6f999572f1661ee",
      "project_id": 1,
      "chunk_index": 10,
      "id": "e4a28052c54743a286be419c9d168ef5",
      "payload": b"\x14ftypqt\x00\x00\x00\x00qt\x00\x00x08wide\x03\xbdd\x11mdat"
    }
    

Replay Recording

ColumnTypeDescription
typestringLiteral: replay_recording
replay_idstring-
key_idOptonal[int]-
org_idint-
project_idint-
receivedintUnix timestamp of when the event was received
replay_recordingdictContains the number of chunks and a unique identifier
  • Request (application/octet-stream)

    python
    {
      "type": "replay_recording",
      "replay_id": "515539018c9b4260a6f999572f1661ee",
      "key_id": 1,
      "org_id": 132,
      "project_id": 10459681,
      "received": 1342632621,
      "replay_recording": {
          "id": "e4a28052c54743a286be419c9d168ef5",
          "chunks": 5
      }
    }