diff --git a/packages/integration-tests/suites/replay/customEvents/test.ts b/packages/integration-tests/suites/replay/customEvents/test.ts index a317ea281e9b..a0d790a5b62c 100644 --- a/packages/integration-tests/suites/replay/customEvents/test.ts +++ b/packages/integration-tests/suites/replay/customEvents/test.ts @@ -10,6 +10,7 @@ import { expectedNavigationPerformanceSpan, getExpectedReplayEvent, } from '../../../utils/replayEventTemplates'; +import type { PerformanceSpan } from '../../../utils/replayHelpers'; import { getCustomRecordingEvents, getReplayEvent, @@ -68,6 +69,13 @@ sentryTest( expectedMemoryPerformanceSpan, ]), ); + + const lcpSpan = collectedPerformanceSpans.find( + s => s.description === 'largest-contentful-paint', + ) as PerformanceSpan; + + // LCP spans should be point-in-time spans + expect(lcpSpan?.startTimestamp).toBeCloseTo(lcpSpan?.endTimestamp); }, ); diff --git a/packages/integration-tests/utils/replayHelpers.ts b/packages/integration-tests/utils/replayHelpers.ts index a35520e0a799..24f6635fd146 100644 --- a/packages/integration-tests/utils/replayHelpers.ts +++ b/packages/integration-tests/utils/replayHelpers.ts @@ -6,7 +6,7 @@ import type { Page, Request } from 'playwright'; import { envelopeRequestParser } from './helpers'; type CustomRecordingEvent = { tag: string; payload: Record }; -type PerformanceSpan = { +export type PerformanceSpan = { op: string; description: string; startTimestamp: number;