-
-
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 #9417 from getsentry/prepare-release/7.77.0
meta: Update CHANGELOG for 7.77.0
- Loading branch information
Showing
52 changed files
with
4,855 additions
and
174 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
|
||
type PackageJson = { | ||
main?: string; | ||
type?: string; | ||
nx?: string; | ||
volta?: any; | ||
}; | ||
|
||
const buildDir = path.join(process.cwd(), 'build'); | ||
const pkjJsonPath = path.join(buildDir, 'package.json'); | ||
const pkgJson: PackageJson = JSON.parse(fs.readFileSync(pkjJsonPath).toString()); | ||
|
||
// This is necessary for Angular 17+ compatibility when SSR is configured which switches dev mode to using Vite. | ||
// Deleting "main" and adding "type": "module" will direct Vite to | ||
// use the fesm2015 bundle instead of the UMD bundle. | ||
delete pkgJson.main; | ||
pkgJson.type = 'module'; | ||
|
||
// no need to keep around other properties that are only relevant for our reop: | ||
delete pkgJson.nx; | ||
delete pkgJson.volta; | ||
|
||
fs.writeFileSync(pkjJsonPath, JSON.stringify(pkgJson, null, 2)); | ||
|
||
console.log('Adjusted package.json for Angular 17+ compatibility.'); |
11 changes: 11 additions & 0 deletions
11
packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
</head> | ||
<body> | ||
<button id="button1" type="button">Button 1</button> | ||
<button id="button2" type="button">Button 2</button> | ||
</body> | ||
</html> |
59 changes: 59 additions & 0 deletions
59
packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/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,59 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/types'; | ||
|
||
import { sentryTest } from '../../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; | ||
|
||
sentryTest('captures Breadcrumb for clicks & debounces them for a second', async ({ getLocalTestUrl, page }) => { | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('**/foo', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
userNames: ['John', 'Jane'], | ||
}), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
}); | ||
|
||
const promise = getFirstSentryEnvelopeRequest<Event>(page); | ||
|
||
await page.goto(url); | ||
|
||
await page.click('#button1'); | ||
// not debounced because other target | ||
await page.click('#button2'); | ||
// This should be debounced | ||
await page.click('#button2'); | ||
|
||
// Wait a second for the debounce to finish | ||
await page.waitForTimeout(1000); | ||
await page.click('#button2'); | ||
|
||
await page.evaluate('Sentry.captureException("test exception")'); | ||
|
||
const eventData = await promise; | ||
|
||
expect(eventData.exception?.values).toHaveLength(1); | ||
|
||
expect(eventData.breadcrumbs).toEqual([ | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.click', | ||
message: 'body > button#button1[type="button"]', | ||
}, | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.click', | ||
message: 'body > button#button2[type="button"]', | ||
}, | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.click', | ||
message: 'body > button#button2[type="button"]', | ||
}, | ||
]); | ||
}); |
10 changes: 10 additions & 0 deletions
10
packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/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,10 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
defaultIntegrations: false, | ||
integrations: [new Sentry.Integrations.Breadcrumbs()], | ||
sampleRate: 1, | ||
}); |
11 changes: 11 additions & 0 deletions
11
...ges/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
</head> | ||
<body> | ||
<input id="input1" type="text" /> | ||
<input id="input2" type="text" /> | ||
</body> | ||
</html> |
66 changes: 66 additions & 0 deletions
66
packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/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,66 @@ | ||
import { expect } from '@playwright/test'; | ||
import type { Event } from '@sentry/types'; | ||
|
||
import { sentryTest } from '../../../../../utils/fixtures'; | ||
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers'; | ||
|
||
sentryTest('captures Breadcrumb for events on inputs & debounced them', async ({ getLocalTestUrl, page }) => { | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route('**/foo', route => { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
userNames: ['John', 'Jane'], | ||
}), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
}); | ||
}); | ||
|
||
const promise = getFirstSentryEnvelopeRequest<Event>(page); | ||
|
||
await page.goto(url); | ||
|
||
await page.click('#input1'); | ||
// Not debounced because other event type | ||
await page.type('#input1', 'John', { delay: 1 }); | ||
// This should be debounced | ||
await page.type('#input1', 'Abby', { delay: 1 }); | ||
// not debounced because other target | ||
await page.type('#input2', 'Anne', { delay: 1 }); | ||
|
||
// Wait a second for the debounce to finish | ||
await page.waitForTimeout(1000); | ||
await page.type('#input2', 'John', { delay: 1 }); | ||
|
||
await page.evaluate('Sentry.captureException("test exception")'); | ||
|
||
const eventData = await promise; | ||
|
||
expect(eventData.exception?.values).toHaveLength(1); | ||
|
||
expect(eventData.breadcrumbs).toEqual([ | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.click', | ||
message: 'body > input#input1[type="text"]', | ||
}, | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.input', | ||
message: 'body > input#input1[type="text"]', | ||
}, | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.input', | ||
message: 'body > input#input2[type="text"]', | ||
}, | ||
{ | ||
timestamp: expect.any(Number), | ||
category: 'ui.input', | ||
message: 'body > input#input2[type="text"]', | ||
}, | ||
]); | ||
}); |
6 changes: 0 additions & 6 deletions
6
packages/browser-integration-tests/suites/replay/compression/subject.js
This file was deleted.
Oops, something went wrong.
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
18 changes: 18 additions & 0 deletions
18
packages/browser-integration-tests/suites/replay/compressionDisabled/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,18 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
window.Replay = new Sentry.Replay({ | ||
flushMinDelay: 200, | ||
flushMaxDelay: 200, | ||
minReplayDuration: 0, | ||
useCompression: false, | ||
}); | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
sampleRate: 0, | ||
replaysSessionSampleRate: 1.0, | ||
replaysOnErrorSampleRate: 0.0, | ||
|
||
integrations: [window.Replay], | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/browser-integration-tests/suites/replay/compressionDisabled/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> |
52 changes: 52 additions & 0 deletions
52
packages/browser-integration-tests/suites/replay/compressionDisabled/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,52 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../utils/fixtures'; | ||
import { getExpectedReplayEvent } from '../../../utils/replayEventTemplates'; | ||
import { | ||
getFullRecordingSnapshots, | ||
getReplayEvent, | ||
replayEnvelopeIsCompressed, | ||
shouldSkipReplayTest, | ||
waitForReplayRequest, | ||
} from '../../../utils/replayHelpers'; | ||
|
||
sentryTest( | ||
'replay recording should allow to disable compression', | ||
async ({ getLocalTestPath, page, forceFlushReplay }) => { | ||
if (shouldSkipReplayTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const reqPromise0 = waitForReplayRequest(page, 0); | ||
|
||
await page.route('https://dsn.ingest.sentry.io/**/*', route => { | ||
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(); | ||
|
||
const req0 = await reqPromise0; | ||
|
||
const replayEvent0 = getReplayEvent(req0); | ||
expect(replayEvent0).toEqual(getExpectedReplayEvent()); | ||
|
||
expect(replayEnvelopeIsCompressed(req0)).toEqual(false); | ||
|
||
const snapshots = getFullRecordingSnapshots(req0); | ||
expect(snapshots.length).toEqual(1); | ||
|
||
const stringifiedSnapshot = JSON.stringify(snapshots[0]); | ||
expect(stringifiedSnapshot).toContain('"tagName":"body"'); | ||
expect(stringifiedSnapshot).toContain('"tagName":"html"'); | ||
expect(stringifiedSnapshot).toContain('"tagName":"button"'); | ||
expect(stringifiedSnapshot).toContain('"textContent":"*** ***"'); | ||
expect(stringifiedSnapshot).toContain('"id":"go-background"'); | ||
}, | ||
); |
19 changes: 19 additions & 0 deletions
19
packages/browser-integration-tests/suites/replay/compressionWorkerUrl/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,19 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
window.Replay = new Sentry.Replay({ | ||
flushMinDelay: 200, | ||
flushMaxDelay: 200, | ||
minReplayDuration: 0, | ||
useCompression: true, | ||
workerUrl: `${window.location.origin}/my-test-worker.js`, | ||
}); | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
sampleRate: 0, | ||
replaysSessionSampleRate: 1.0, | ||
replaysOnErrorSampleRate: 0.0, | ||
|
||
integrations: [window.Replay], | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/browser-integration-tests/suites/replay/compressionWorkerUrl/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> |
Oops, something went wrong.