Skip to content

Commit

Permalink
like the mobile SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Dec 9, 2024
1 parent 4b2db67 commit 26e531a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
42 changes: 28 additions & 14 deletions src/__tests__/extensions/replay/sessionrecording.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,8 @@ describe('SessionRecording', () => {
],
$session_id: sessionId,
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
{
_url: 'https://test.com/s/',
Expand Down Expand Up @@ -894,7 +895,8 @@ describe('SessionRecording', () => {
{ type: 3, data: { source: 1 } },
{ type: 3, data: { source: 2 } },
],
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
{
_url: 'https://test.com/s/',
Expand Down Expand Up @@ -975,7 +977,8 @@ describe('SessionRecording', () => {
$window_id: 'windowId',
$snapshot_data: [{ data: { source: 1 }, emit: 1, type: 3 }],
$snapshot_bytes: 39,
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
{
_url: 'https://test.com/s/',
Expand Down Expand Up @@ -1583,7 +1586,8 @@ describe('SessionRecording', () => {
$session_id: firstSessionId,
$snapshot_bytes: 186,
$window_id: expect.any(String),
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
{
_batchKey: 'recordings',
Expand Down Expand Up @@ -1674,7 +1678,8 @@ describe('SessionRecording', () => {
$session_id: firstSessionId,
$snapshot_bytes: 186,
$window_id: expect.any(String),
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
{
_batchKey: 'recordings',
Expand All @@ -1701,7 +1706,8 @@ describe('SessionRecording', () => {
$session_id: firstSessionId,
$snapshot_bytes: 186,
$window_id: expect.any(String),
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
{
_batchKey: 'recordings',
Expand Down Expand Up @@ -2122,7 +2128,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: expect.any(Number),
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand All @@ -2144,7 +2151,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: expect.any(Number),
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand Down Expand Up @@ -2174,7 +2182,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: expect.any(Number),
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand Down Expand Up @@ -2205,7 +2214,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: expect.any(Number),
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand All @@ -2225,7 +2235,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: 86,
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand All @@ -2250,7 +2261,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: 58,
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand All @@ -2274,7 +2286,8 @@ describe('SessionRecording', () => {
$session_id: sessionId,
$snapshot_bytes: 69,
$window_id: 'windowId',
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
captureOptions
)
Expand Down Expand Up @@ -2321,7 +2334,8 @@ describe('SessionRecording', () => {
{ type: 3, data: { source: 1 } },
{ type: 3, data: { source: 2 } },
],
$snapshot_library: 'web/ver/v0.0.1/script_name/recorder',
$lib: 'web',
$lib_version: 'v0.0.1',
},
expect.any(Object)
)
Expand Down
3 changes: 2 additions & 1 deletion src/extensions/replay/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,8 @@ export class SessionRecording {
$snapshot_data: snapshotBuffer.data,
$session_id: snapshotBuffer.sessionId,
$window_id: snapshotBuffer.windowId,
$snapshot_library: `web/ver/${Config.LIB_VERSION}/script_name/${this.scriptName}`,
$lib: 'web',
$lib_version: Config.LIB_VERSION,
})
})
}
Expand Down

0 comments on commit 26e531a

Please sign in to comment.