getReplayIdFromEvent.tsx 294 B

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