mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
26 lines
665 B
TypeScript
26 lines
665 B
TypeScript
import type {RecordingFrame} from 'sentry/utils/replays/types';
|
|
import {EventType} from 'sentry/utils/replays/types';
|
|
import type {ReplayRecord} from 'sentry/views/replays/types';
|
|
|
|
export function recordingStartFrame(replayRecord: ReplayRecord): RecordingFrame {
|
|
return {
|
|
type: EventType.Custom,
|
|
timestamp: replayRecord.started_at.getTime(),
|
|
data: {
|
|
tag: 'replay.start',
|
|
payload: {},
|
|
},
|
|
};
|
|
}
|
|
|
|
export function recordingEndFrame(replayRecord: ReplayRecord): RecordingFrame {
|
|
return {
|
|
type: EventType.Custom,
|
|
timestamp: replayRecord.finished_at.getTime(),
|
|
data: {
|
|
tag: 'replay.end',
|
|
payload: {},
|
|
},
|
|
};
|
|
}
|