-
-
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 #10405 from getsentry/prepare-release/7.99.0
meta(changelog): Update changelog for 7.99.0
- Loading branch information
Showing
223 changed files
with
5,239 additions
and
1,169 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
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
23 changes: 23 additions & 0 deletions
23
dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim /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,23 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
// Replay should not actually work, but still not error out | ||
window.Replay = new Sentry.replayIntegration({ | ||
flushMinDelay: 200, | ||
flushMaxDelay: 200, | ||
minReplayDuration: 0, | ||
}); | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
sampleRate: 1, | ||
replaysSessionSampleRate: 1.0, | ||
replaysOnErrorSampleRate: 0.0, | ||
integrations: [window.Replay], | ||
}); | ||
|
||
// Ensure none of these break | ||
window.Replay.start(); | ||
window.Replay.stop(); | ||
window.Replay.flush(); |
9 changes: 9 additions & 0 deletions
9
dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim /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,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button onclick="console.log('Test log')">Click me</button> | ||
</body> | ||
</html> |
35 changes: 35 additions & 0 deletions
35
dev-packages/browser-integration-tests/suites/replay/replayIntegrationShim /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,35 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../utils/fixtures'; | ||
|
||
sentryTest( | ||
'exports a shim replayIntegration integration for non-replay bundles', | ||
async ({ getLocalTestPath, page, forceFlushReplay }) => { | ||
const bundle = process.env.PW_BUNDLE; | ||
|
||
if (!bundle || !bundle.startsWith('bundle_') || bundle.includes('replay')) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const consoleMessages: string[] = []; | ||
page.on('console', msg => consoleMessages.push(msg.text())); | ||
|
||
let requestCount = 0; | ||
await page.route('https://dsn.ingest.sentry.io/**/*', route => { | ||
requestCount++; | ||
return route.fulfill({ | ||
status: 200, | ||
contentType: 'application/json', | ||
body: JSON.stringify({ id: 'test-id' }), | ||
}); | ||
}); | ||
|
||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
await page.goto(url); | ||
await forceFlushReplay(); | ||
|
||
expect(requestCount).toBe(0); | ||
expect(consoleMessages).toEqual(['You are using new Replay() even though this bundle does not include replay.']); | ||
}, | ||
); |
9 changes: 9 additions & 0 deletions
9
...r-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/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,9 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [Sentry.browserTracingIntegration({ idleTimeout: 9000 })], | ||
tracesSampleRate: 1, | ||
}); |
11 changes: 11 additions & 0 deletions
11
...ntegration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/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,11 @@ | ||
document.getElementById('go-background').addEventListener('click', () => { | ||
Object.defineProperty(document, 'hidden', { value: true, writable: true }); | ||
const ev = document.createEvent('Event'); | ||
ev.initEvent('visibilitychange'); | ||
document.dispatchEvent(ev); | ||
}); | ||
|
||
document.getElementById('start-transaction').addEventListener('click', () => { | ||
window.transaction = Sentry.startTransaction({ name: 'test-transaction' }); | ||
Sentry.getCurrentHub().configureScope(scope => scope.setSpan(window.transaction)); | ||
}); |
10 changes: 10 additions & 0 deletions
10
...gration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/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,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button id="start-transaction">Start Transaction</button> | ||
<button id="go-background">New Tab</button> | ||
</body> | ||
</html> |
45 changes: 45 additions & 0 deletions
45
...r-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/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,45 @@ | ||
import type { JSHandle } from '@playwright/test'; | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/types'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; | ||
|
||
async function getPropertyValue(handle: JSHandle, prop: string) { | ||
return (await handle.getProperty(prop))?.jsonValue(); | ||
} | ||
|
||
sentryTest('should finish a custom transaction when the page goes background', async ({ getLocalTestPath, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
const pageloadTransaction = await getFirstSentryEnvelopeRequest<Event>(page, url); | ||
expect(pageloadTransaction).toBeDefined(); | ||
|
||
await page.locator('#start-transaction').click(); | ||
const transactionHandle = await page.evaluateHandle('window.transaction'); | ||
|
||
const id_before = await getPropertyValue(transactionHandle, 'span_id'); | ||
const name_before = await getPropertyValue(transactionHandle, 'name'); | ||
const status_before = await getPropertyValue(transactionHandle, 'status'); | ||
const tags_before = await getPropertyValue(transactionHandle, 'tags'); | ||
|
||
expect(name_before).toBe('test-transaction'); | ||
expect(status_before).toBeUndefined(); | ||
expect(tags_before).toStrictEqual({}); | ||
|
||
await page.locator('#go-background').click(); | ||
|
||
const id_after = await getPropertyValue(transactionHandle, 'span_id'); | ||
const name_after = await getPropertyValue(transactionHandle, 'name'); | ||
const status_after = await getPropertyValue(transactionHandle, 'status'); | ||
const tags_after = await getPropertyValue(transactionHandle, 'tags'); | ||
|
||
expect(id_before).toBe(id_after); | ||
expect(name_after).toBe(name_before); | ||
expect(status_after).toBe('cancelled'); | ||
expect(tags_after).toStrictEqual({ visibilitychange: 'document.hidden' }); | ||
}); |
8 changes: 8 additions & 0 deletions
8
...egration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/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,8 @@ | ||
document.getElementById('go-background').addEventListener('click', () => { | ||
setTimeout(() => { | ||
Object.defineProperty(document, 'hidden', { value: true, writable: true }); | ||
const ev = document.createEvent('Event'); | ||
ev.initEvent('visibilitychange'); | ||
document.dispatchEvent(ev); | ||
}, 250); | ||
}); |
9 changes: 9 additions & 0 deletions
9
...ation-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/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,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button id="go-background">New Tab</button> | ||
</body> | ||
</html> |
23 changes: 23 additions & 0 deletions
23
...integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-pageload/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,23 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/types'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers'; | ||
|
||
sentryTest('should finish pageload transaction when the page goes background', async ({ getLocalTestPath, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
await page.goto(url); | ||
await page.locator('#go-background').click(); | ||
|
||
const pageloadTransaction = await getFirstSentryEnvelopeRequest<Event>(page); | ||
|
||
expect(pageloadTransaction.contexts?.trace?.op).toBe('pageload'); | ||
expect(pageloadTransaction.contexts?.trace?.status).toBe('cancelled'); | ||
expect(pageloadTransaction.contexts?.trace?.tags).toMatchObject({ | ||
visibilitychange: 'document.hidden', | ||
}); | ||
}); |
16 changes: 16 additions & 0 deletions
16
...s/browser-integration-tests/suites/tracing/browserTracingIntegration/http-timings/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,16 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [ | ||
Sentry.browserTracingIntegration({ | ||
idleTimeout: 1000, | ||
_experiments: { | ||
enableHTTPTimings: true, | ||
}, | ||
}), | ||
], | ||
tracesSampleRate: 1, | ||
}); |
1 change: 1 addition & 0 deletions
1
...rowser-integration-tests/suites/tracing/browserTracingIntegration/http-timings/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 @@ | ||
fetch('http://example.com/0').then(fetch('http://example.com/1').then(fetch('http://example.com/2'))); |
Oops, something went wrong.