Skip to content

Commit bb80ca8

Browse files
committed
assert on server island resource.link span in pageload transaction
1 parent 69fd85b commit bb80ca8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dev-packages/e2e-tests/test-applications/astro-5/tests/tracing.serverIslands.test.ts

+13
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ test.describe('tracing in static routes with server islands', () => {
5151
type: 'transaction',
5252
});
5353

54+
const pageloadSpans = clientPageloadTxn.spans;
55+
56+
// pageload transaction contains a resource link span for the preloaded server island request
57+
expect(pageloadSpans).toEqual(
58+
expect.arrayContaining([
59+
expect.objectContaining({
60+
op: 'resource.link',
61+
origin: 'auto.resource.browser.metrics',
62+
description: expect.stringMatching(/\/_server-islands\/Avatar.*$/),
63+
}),
64+
]),
65+
);
66+
5467
expect(baggageMetaTagContent).toContain('sentry-transaction=GET%20%2Fserver-island%2F'); // URL-encoded for 'GET /test-static/'
5568
expect(baggageMetaTagContent).toContain('sentry-sampled=true');
5669

0 commit comments

Comments
 (0)