Files
sentinel/static/app/utils/replays/getReplayIdFromEvent.tsx
2024-02-15 17:01:50 +00:00

9 lines
299 B
TypeScript

import type {Event} from 'sentry/types';
export function getReplayIdFromEvent(event: Event | null | undefined) {
const replayTagId = event?.tags?.find(({key}) => key === 'replayId')?.value;
const replayContextId = event?.contexts?.replay?.replay_id;
return replayContextId ?? replayTagId;
}