-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meta(changelog): Update changelog for 7.81.0 #9596
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
010eb69
Merge pull request #9552 from getsentry/master
github-actions[bot] f1ed0e9
ref: Deprecate `extractTraceParentData` from `@sentry/core` & downstr…
mydea 11e0c2d
feat(nextjs): Add instrumentation utility for server actions (#9553)
lforst db127a3
chore(feedback): Readme note beta and ea org (#9558)
bruno-garcia 04a41ee
codeql: use extended query pack
mdtro 6d42457
docs(feedback): Example docs on `sendFeedback` (#9560)
billyvg ad4f2d1
Merge pull request #9559 from getsentry/mdtro/codeql-extended
mdtro ade4c1d
test(e2e): Assert that there are no funky build time warnings when bu…
lforst d68ab17
test: Add test for manual client usage (#9567)
mydea e4cd09c
test: Add loader test for unhandled promise rejection (#9581)
mydea 5698094
ref(replay): Add further logging to network body parsing (#9566)
mydea ed2b201
fix(nextjs): Download CLI binary if it can't be found (#9584)
lforst 13aaf3c
feat(feedback): Add `level` and remove breadcrumbs from feedback even…
billyvg f48b697
dev: Add missing `--sig` arg to `yalc:publish` task (#9511)
billyvg 1e2bf6e
ref(tracing-internal): Export fetch instrumentation (#9473)
lforst ff416ae
feat(vercel-edge): Add fetch instrumentation (#9504)
lforst 6f4edf8
feat(vue): Support Vue 3 lifecycle hooks in mixin options (#9578)
snoozbuster 4ff96ec
meta(changelog): Update changelog for 7.81.0
lforst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...egration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/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,3 @@ | ||
new Promise(function (resolve, reject) { | ||
reject('this is unhandled'); | ||
}); |
15 changes: 15 additions & 0 deletions
15
...integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/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,15 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; | ||
|
||
sentryTest('unhandled promise rejection handler works', async ({ getLocalTestUrl, page }) => { | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
const req = await waitForErrorRequestOnUrl(page, url); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
expect(eventData.exception?.values?.length).toBe(1); | ||
expect(eventData.exception?.values?.[0]?.value).toBe( | ||
'Non-Error promise rejection captured with value: this is unhandled', | ||
); | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/browser-integration-tests/suites/feedback/captureFeedback/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'; | ||
import { Feedback } from '@sentry-internal/feedback'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [new Feedback()], | ||
}); |
7 changes: 7 additions & 0 deletions
7
packages/browser-integration-tests/suites/feedback/captureFeedback/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,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body></body> | ||
</html> |
74 changes: 74 additions & 0 deletions
74
packages/browser-integration-tests/suites/feedback/captureFeedback/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,74 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../utils/fixtures'; | ||
import { envelopeRequestParser, getEnvelopeType } from '../../../utils/helpers'; | ||
|
||
sentryTest('should capture feedback (@sentry-internal/feedback import)', async ({ getLocalTestPath, page }) => { | ||
if (process.env.PW_BUNDLE) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const feedbackRequestPromise = page.waitForResponse(res => { | ||
const req = res.request(); | ||
|
||
const postData = req.postData(); | ||
if (!postData) { | ||
return false; | ||
} | ||
|
||
try { | ||
return getEnvelopeType(req) === 'feedback'; | ||
} catch (err) { | ||
return false; | ||
} | ||
}); | ||
|
||
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 page.getByText('Report a Bug').click(); | ||
expect(await page.locator(':visible:text-is("Report a Bug")').count()).toEqual(1); | ||
await page.locator('[name="name"]').fill('Jane Doe'); | ||
await page.locator('[name="email"]').fill('janedoe@example.org'); | ||
await page.locator('[name="message"]').fill('my example feedback'); | ||
await page.getByLabel('Send Bug Report').click(); | ||
|
||
const feedbackEvent = envelopeRequestParser((await feedbackRequestPromise).request()); | ||
expect(feedbackEvent).toEqual({ | ||
type: 'feedback', | ||
contexts: { | ||
feedback: { | ||
contact_email: 'janedoe@example.org', | ||
message: 'my example feedback', | ||
name: 'Jane Doe', | ||
source: 'widget', | ||
url: expect.stringContaining('/dist/index.html'), | ||
}, | ||
}, | ||
level: 'info', | ||
timestamp: expect.any(Number), | ||
event_id: expect.stringMatching(/\w{32}/), | ||
environment: 'production', | ||
sdk: { | ||
integrations: expect.arrayContaining(['Feedback']), | ||
version: expect.any(String), | ||
name: 'sentry.javascript.browser', | ||
packages: expect.anything(), | ||
}, | ||
request: { | ||
url: expect.stringContaining('/dist/index.html'), | ||
headers: { | ||
'User-Agent': expect.stringContaining(''), | ||
}, | ||
}, | ||
platform: 'javascript', | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/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'; | ||
import { Feedback } from '@sentry-internal/feedback'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
replaysOnErrorSampleRate: 1.0, | ||
replaysSessionSampleRate: 0, | ||
integrations: [ | ||
new Sentry.Replay({ | ||
flushMinDelay: 200, | ||
flushMaxDelay: 200, | ||
minReplayDuration: 0, | ||
}), | ||
new Feedback(), | ||
], | ||
}); |
7 changes: 7 additions & 0 deletions
7
packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/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,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body></body> | ||
</html> |
90 changes: 90 additions & 0 deletions
90
packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/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,90 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../utils/fixtures'; | ||
import { envelopeRequestParser, getEnvelopeType } from '../../../utils/helpers'; | ||
import { getCustomRecordingEvents, getReplayEvent, waitForReplayRequest } from '../../../utils/replayHelpers'; | ||
|
||
sentryTest('should capture feedback (@sentry-internal/feedback import)', async ({ getLocalTestPath, page }) => { | ||
if (process.env.PW_BUNDLE) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const reqPromise0 = waitForReplayRequest(page, 0); | ||
const feedbackRequestPromise = page.waitForResponse(res => { | ||
const req = res.request(); | ||
|
||
const postData = req.postData(); | ||
if (!postData) { | ||
return false; | ||
} | ||
|
||
try { | ||
return getEnvelopeType(req) === 'feedback'; | ||
} catch (err) { | ||
return false; | ||
} | ||
}); | ||
|
||
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 page.getByText('Report a Bug').click(); | ||
await page.locator('[name="name"]').fill('Jane Doe'); | ||
await page.locator('[name="email"]').fill('janedoe@example.org'); | ||
await page.locator('[name="message"]').fill('my example feedback'); | ||
await page.getByLabel('Send Bug Report').click(); | ||
|
||
const [feedbackResp, replayReq] = await Promise.all([feedbackRequestPromise, reqPromise0]); | ||
|
||
const feedbackEvent = envelopeRequestParser(feedbackResp.request()); | ||
const replayEvent = getReplayEvent(replayReq); | ||
const { breadcrumbs } = getCustomRecordingEvents(replayReq); | ||
|
||
expect(breadcrumbs).toEqual( | ||
expect.arrayContaining([ | ||
{ | ||
category: 'sentry.feedback', | ||
data: { feedbackId: expect.any(String) }, | ||
}, | ||
]), | ||
); | ||
|
||
expect(feedbackEvent).toEqual({ | ||
type: 'feedback', | ||
contexts: { | ||
feedback: { | ||
contact_email: 'janedoe@example.org', | ||
message: 'my example feedback', | ||
name: 'Jane Doe', | ||
replay_id: replayEvent.event_id, | ||
source: 'widget', | ||
url: expect.stringContaining('/dist/index.html'), | ||
}, | ||
}, | ||
level: 'info', | ||
timestamp: expect.any(Number), | ||
event_id: expect.stringMatching(/\w{32}/), | ||
environment: 'production', | ||
sdk: { | ||
integrations: expect.arrayContaining(['Feedback']), | ||
version: expect.any(String), | ||
name: 'sentry.javascript.browser', | ||
packages: expect.anything(), | ||
}, | ||
request: { | ||
url: expect.stringContaining('/dist/index.html'), | ||
headers: { | ||
'User-Agent': expect.stringContaining(''), | ||
}, | ||
}, | ||
platform: 'javascript', | ||
}); | ||
}); |
37 changes: 37 additions & 0 deletions
37
packages/browser-integration-tests/suites/manual-client/browser-context/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,37 @@ | ||
import { | ||
BrowserClient, | ||
Breadcrumbs, | ||
Dedupe, | ||
FunctionToString, | ||
HttpContext, | ||
InboundFilters, | ||
LinkedErrors, | ||
defaultStackParser, | ||
makeFetchTransport, | ||
Hub, | ||
} from '@sentry/browser'; | ||
|
||
const integrations = [ | ||
new Breadcrumbs(), | ||
new FunctionToString(), | ||
new Dedupe(), | ||
new HttpContext(), | ||
new InboundFilters(), | ||
new LinkedErrors(), | ||
]; | ||
|
||
const client = new BrowserClient({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
release: '0.0.1', | ||
environment: 'local', | ||
sampleRate: 1.0, | ||
tracesSampleRate: 0.0, | ||
transport: makeFetchTransport, | ||
stackParser: defaultStackParser, | ||
integrations, | ||
debug: true, | ||
}); | ||
|
||
const hub = new Hub(client); | ||
|
||
hub.captureException(new Error('test client')); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought I'd leave it in because maybe people become inspired and look at the examples 🤷