diff --git a/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts index 053c31c3881e..a77539643738 100644 --- a/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts @@ -8,6 +8,7 @@ import { expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedLCPPerformanceSpan, + expectedTTFBPerformanceSpan, expectedMemoryPerformanceSpan, expectedNavigationPerformanceSpan, getExpectedReplayEvent, @@ -65,6 +66,7 @@ sentryTest( expectedNavigationPerformanceSpan, expectedLCPPerformanceSpan, expectedCLSPerformanceSpan, + expectedTTFBPerformanceSpan, expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedFCPPerformanceSpan, diff --git a/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts index 7bacf5a8ae17..bbcf7e4400dd 100644 --- a/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts @@ -8,6 +8,7 @@ import { expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedLCPPerformanceSpan, + expectedTTFBPerformanceSpan, expectedMemoryPerformanceSpan, expectedNavigationBreadcrumb, expectedNavigationPerformanceSpan, @@ -86,6 +87,7 @@ sentryTest( expectedNavigationPerformanceSpan, expectedLCPPerformanceSpan, expectedCLSPerformanceSpan, + expectedTTFBPerformanceSpan, expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedFCPPerformanceSpan, @@ -126,6 +128,7 @@ sentryTest( expectedReloadPerformanceSpan, expectedLCPPerformanceSpan, expectedCLSPerformanceSpan, + expectedTTFBPerformanceSpan, expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedFCPPerformanceSpan, @@ -195,6 +198,7 @@ sentryTest( expectedNavigationPerformanceSpan, expectedLCPPerformanceSpan, expectedCLSPerformanceSpan, + expectedTTFBPerformanceSpan, expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedFCPPerformanceSpan, @@ -318,6 +322,7 @@ sentryTest( expectedNavigationPerformanceSpan, expectedLCPPerformanceSpan, expectedCLSPerformanceSpan, + expectedTTFBPerformanceSpan, expectedFIDPerformanceSpan, expectedFPPerformanceSpan, expectedFCPPerformanceSpan, diff --git a/dev-packages/browser-integration-tests/utils/replayEventTemplates.ts b/dev-packages/browser-integration-tests/utils/replayEventTemplates.ts index 070590da9e8f..c15eb57be429 100644 --- a/dev-packages/browser-integration-tests/utils/replayEventTemplates.ts +++ b/dev-packages/browser-integration-tests/utils/replayEventTemplates.ts @@ -127,7 +127,7 @@ export const expectedLCPPerformanceSpan = { endTimestamp: expect.any(Number), data: { value: expect.any(Number), - nodeId: expect.any(Number), + nodeId: expect.any(Array), rating: expect.any(String), size: expect.any(Number), }, @@ -142,6 +142,7 @@ export const expectedCLSPerformanceSpan = { value: expect.any(Number), rating: expect.any(String), size: expect.any(Number), + nodeId: expect.any(Array), }, }; @@ -154,7 +155,7 @@ export const expectedFIDPerformanceSpan = { value: expect.any(Number), rating: expect.any(String), size: expect.any(Number), - nodeId: expect.any(Number), + nodeId: expect.any(Array), }, }; @@ -167,11 +168,11 @@ export const expectedINPPerformanceSpan = { value: expect.any(Number), rating: expect.any(String), size: expect.any(Number), - nodeId: expect.any(Number), + nodeId: expect.any(Array), }, }; -export const expectedTTFB = { +export const expectedTTFBPerformanceSpan = { op: 'web-vital', description: 'time-to-first-byte', startTimestamp: expect.any(Number), @@ -180,7 +181,7 @@ export const expectedTTFB = { value: expect.any(Number), rating: expect.any(String), size: expect.any(Number), - nodeId: expect.any(Number), + nodeId: expect.any(Array), }, }; diff --git a/dev-packages/e2e-tests/test-applications/react-send-to-sentry/tests/fixtures/ReplayRecordingData.ts b/dev-packages/e2e-tests/test-applications/react-send-to-sentry/tests/fixtures/ReplayRecordingData.ts index 156c2775f5ff..37a3de460259 100644 --- a/dev-packages/e2e-tests/test-applications/react-send-to-sentry/tests/fixtures/ReplayRecordingData.ts +++ b/dev-packages/e2e-tests/test-applications/react-send-to-sentry/tests/fixtures/ReplayRecordingData.ts @@ -220,7 +220,26 @@ export const ReplayRecordingData = [ value: expect.any(Number), size: expect.any(Number), rating: expect.any(String), - nodeId: 16, + nodeId: [16], + }, + }, + }, + }, + { + type: 5, + timestamp: expect.any(Number), + data: { + tag: 'performanceSpan', + payload: { + op: 'web-vital', + description: 'time-to-first-byte', + startTimestamp: expect.any(Number), + endTimestamp: expect.any(Number), + data: { + value: expect.any(Number), + size: expect.any(Number), + rating: expect.any(String), + nodeId: [], }, }, }, @@ -239,6 +258,7 @@ export const ReplayRecordingData = [ value: expect.any(Number), size: expect.any(Number), rating: expect.any(String), + nodeId: [], }, }, }, @@ -257,7 +277,7 @@ export const ReplayRecordingData = [ value: expect.any(Number), size: expect.any(Number), rating: expect.any(String), - nodeId: 10, + nodeId: [10], }, }, }, diff --git a/packages/replay-internal/test/unit/util/createPerformanceEntry.test.ts b/packages/replay-internal/test/unit/util/createPerformanceEntry.test.ts index e2d44ed687f6..f63bae23d1b2 100644 --- a/packages/replay-internal/test/unit/util/createPerformanceEntry.test.ts +++ b/packages/replay-internal/test/unit/util/createPerformanceEntry.test.ts @@ -84,7 +84,7 @@ describe('Unit | util | createPerformanceEntries', () => { name: 'largest-contentful-paint', start: 1672531205.108299, end: 1672531205.108299, - data: { value: 5108.299, rating: 'good', size: 5108.299, nodeId: undefined }, + data: { value: 5108.299, rating: 'good', size: 5108.299, nodeId: [] }, }); }); }); @@ -104,7 +104,7 @@ describe('Unit | util | createPerformanceEntries', () => { name: 'cumulative-layout-shift', start: 1672531205.108299, end: 1672531205.108299, - data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: undefined }, + data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: [] }, }); }); }); @@ -124,7 +124,7 @@ describe('Unit | util | createPerformanceEntries', () => { name: 'first-input-delay', start: 1672531205.108299, end: 1672531205.108299, - data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: undefined }, + data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: [] }, }); }); }); @@ -144,7 +144,7 @@ describe('Unit | util | createPerformanceEntries', () => { name: 'interaction-to-next-paint', start: 1672531205.108299, end: 1672531205.108299, - data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: undefined }, + data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: [] }, }); }); }); @@ -164,7 +164,7 @@ describe('Unit | util | createPerformanceEntries', () => { name: 'time-to-first-byte', start: 1672531205.108299, end: 1672531205.108299, - data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: undefined }, + data: { value: 5108.299, size: 5108.299, rating: 'good', nodeId: [] }, }); }); });