-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14244 from getsentry/prepare-release/8.38.0
meta(changelog): Update changelog for 8.38.0
- Loading branch information
Showing
90 changed files
with
2,001 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
.../browser-integration-tests/suites/integrations/lazyLoad/moduleMetadataIntegration/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [], | ||
}); | ||
|
||
window.Sentry = { | ||
...Sentry, | ||
// Ensure this is _not_ set | ||
moduleMetadataIntegration: undefined, | ||
}; |
7 changes: 7 additions & 0 deletions
7
...owser-integration-tests/suites/integrations/lazyLoad/moduleMetadataIntegration/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
window._testLazyLoadIntegration = async function run() { | ||
const integration = await window.Sentry.lazyLoadIntegration('moduleMetadataIntegration'); | ||
|
||
window.Sentry.getClient()?.addIntegration(integration()); | ||
|
||
window._integrationLoaded = true; | ||
}; |
33 changes: 33 additions & 0 deletions
33
.../browser-integration-tests/suites/integrations/lazyLoad/moduleMetadataIntegration/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { expect } from '@playwright/test'; | ||
import { SDK_VERSION } from '@sentry/browser'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
|
||
sentryTest('it allows to lazy load the moduleMetadata integration', async ({ getLocalTestUrl, page }) => { | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/modulemetadata.min.js`, route => { | ||
return route.fulfill({ | ||
status: 200, | ||
contentType: 'application/javascript;', | ||
body: "window.Sentry.moduleMetadataIntegration = () => ({ name: 'ModuleMetadata' })", | ||
}); | ||
}); | ||
|
||
await page.goto(url); | ||
|
||
const hasIntegration = await page.evaluate('!!window.Sentry.getClient()?.getIntegrationByName("ModuleMetadata")'); | ||
expect(hasIntegration).toBe(false); | ||
|
||
const scriptTagsBefore = await page.evaluate<number>('document.querySelectorAll("script").length'); | ||
|
||
await page.evaluate('window._testLazyLoadIntegration()'); | ||
await page.waitForFunction('window._integrationLoaded'); | ||
|
||
const scriptTagsAfter = await page.evaluate<number>('document.querySelectorAll("script").length'); | ||
|
||
const hasIntegration2 = await page.evaluate('!!window.Sentry.getClient()?.getIntegrationByName("ModuleMetadata")'); | ||
expect(hasIntegration2).toBe(true); | ||
|
||
expect(scriptTagsAfter).toBe(scriptTagsBefore + 1); | ||
}); |
17 changes: 17 additions & 0 deletions
17
...s/suites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [ | ||
Sentry.browserTracingIntegration({ | ||
idleTimeout: 9000, | ||
enableLongTask: false, | ||
enableLongAnimationFrame: true, | ||
instrumentPageLoad: false, | ||
enableInp: false, | ||
}), | ||
], | ||
tracesSampleRate: 1, | ||
}); |
18 changes: 18 additions & 0 deletions
18
...uites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function getElapsed(startTime) { | ||
const time = Date.now(); | ||
return time - startTime; | ||
} | ||
|
||
function handleClick() { | ||
const startTime = Date.now(); | ||
while (getElapsed(startTime) < 105) { | ||
// | ||
} | ||
window.history.pushState({}, '', `#myHeading`); | ||
} | ||
|
||
const button = document.getElementById('clickme'); | ||
|
||
console.log('button', button); | ||
|
||
button.addEventListener('click', handleClick); |
13 changes: 13 additions & 0 deletions
13
...es/tracing/browserTracingIntegration/long-animation-frame-before-navigation/template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button id="clickme"> | ||
click me to start the long animation! | ||
</button> | ||
|
||
<h1 id="myHeading">My Heading</h1> | ||
</body> | ||
</html> |
31 changes: 31 additions & 0 deletions
31
...s/suites/tracing/browserTracingIntegration/long-animation-frame-before-navigation/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/types'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; | ||
|
||
sentryTest( | ||
"doesn't capture long animation frame that starts before a navigation.", | ||
async ({ browserName, getLocalTestPath, page }) => { | ||
// Long animation frames only work on chrome | ||
if (shouldSkipTracingTest() || browserName !== 'chromium') { | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
await page.goto(url); | ||
|
||
const navigationTransactionEventPromise = getFirstSentryEnvelopeRequest<Event>(page); | ||
|
||
await page.locator('#clickme').click(); | ||
|
||
const navigationTransactionEvent = await navigationTransactionEventPromise; | ||
|
||
expect(navigationTransactionEvent.contexts?.trace?.op).toBe('navigation'); | ||
|
||
const loafSpans = navigationTransactionEvent.spans?.filter(s => s.op?.startsWith('ui.long-animation-frame')); | ||
|
||
expect(loafSpans?.length).toEqual(0); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,4 @@ Sentry.init({ | |
}), | ||
], | ||
tracesSampleRate: 1, | ||
debug: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.