-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
meta: Update CHANGELOG for version 7.62.0 #8754
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2e1c4a5
Merge pull request #8734 from getsentry/master
github-actions[bot] 7947e34
ref(ember): Update ember type/eslint/tsconfig usage (#8718)
mydea 436fdeb
feat(integrations): Add `ContextLines` integration for html-embedded …
Lms24 b9a1c2b
ref: Hoist `flush`, `close`, and `lastEventId` into `@sentry/core` (#…
e0e246d
test: Use `getLocalTestUrl` instead of `getLocalTestPath` for xhr tes…
mydea a0290b9
ref(replay): Improve internal logging (#8740)
mydea f7d37a0
ref(node): Don't call `JSON.stringify` on prisma client when logging …
88e9418
fix(replay): Cancel debounce when replay is too short/long (#8742)
mydea 4c6f62e
ref(replay): Ensure we only clear for buffer mode (#8744)
mydea 5044e6b
ref(replay): Log warning if trying to flush initial segment without c…
mydea fac2be8
fix(nextjs): Make all wrappers isomorphic and available in all runtim…
a4ae291
fix(utils): `dirname` and `basename` should handle Windows paths (#8737)
timfish 672e56c
chore(ci): Make "Required Tests passed" job depend on artifact upload…
Lms24 22a8add
chore(ci): Add `job_required_jobs_passed` as a status provider contex…
Lms24 8a0a33c
meta: Update CHANGELOG for version 7.62.0
Lms24 9070e3e
add ContextLines description, apply feedback
Lms24 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
9 changes: 9 additions & 0 deletions
9
packages/browser-integration-tests/suites/integrations/ContextLines/init.js
This file contains hidden or 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 { ContextLines } from '@sentry/integrations'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [new ContextLines()], | ||
}); |
12 changes: 12 additions & 0 deletions
12
packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html
This file contains hidden or 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 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button id="inline-error-btn" onclick="throw new Error('Error with context lines')">Click me</button> | ||
</body> | ||
<footer> | ||
Some text... | ||
</foot> | ||
</html> |
53 changes: 53 additions & 0 deletions
53
packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts
This file contains hidden or 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,53 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; | ||
|
||
sentryTest( | ||
'should add source context lines around stack frames from errors in Html inline JS', | ||
async ({ getLocalTestPath, page, browserName }) => { | ||
if (browserName === 'webkit') { | ||
// The error we're throwing in this test is thrown as "Script error." in Webkit. | ||
// We filter "Script error." out by default in `InboundFilters`. | ||
// I don't think there's much value to disable InboundFilters defaults for this test, | ||
// given that most of our users won't do that either. | ||
// Let's skip it instead for Webkit. | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
const eventReqPromise = waitForErrorRequestOnUrl(page, url); | ||
|
||
const clickPromise = page.click('#inline-error-btn'); | ||
|
||
const [req] = await Promise.all([eventReqPromise, clickPromise]); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
|
||
expect(eventData.exception?.values).toHaveLength(1); | ||
|
||
const exception = eventData.exception?.values?.[0]; | ||
|
||
expect(exception).toMatchObject({ | ||
stacktrace: { | ||
frames: [ | ||
{ | ||
pre_context: ['<!DOCTYPE html>', '<html>', '<head>', ' <meta charset="utf-8">', ' </head>', ' <body>'], | ||
context_line: | ||
' <button id="inline-error-btn" onclick="throw new Error(\'Error with context lines\')">Click me</button>', | ||
post_context: [ | ||
expect.stringContaining('<script'), // this line varies in the test based on tarball/cdn bundle (+variants) | ||
' <footer>', | ||
' Some text...', | ||
' ', | ||
'', | ||
'</footer></body>', | ||
'</html>', | ||
], | ||
}, | ||
], | ||
}, | ||
}); | ||
}, | ||
); |
3 changes: 3 additions & 0 deletions
3
packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js
This file contains hidden or 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 @@ | ||
document.getElementById('script-error-btn').addEventListener('click', () => { | ||
throw new Error('Error without context lines'); | ||
}); |
12 changes: 12 additions & 0 deletions
12
...ges/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html
This file contains hidden or 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 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<body> | ||
<button id="script-error-btn">Click me</button> | ||
</body> | ||
<footer> | ||
Some text... | ||
</foot> | ||
</html> |
25 changes: 25 additions & 0 deletions
25
packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts
This file contains hidden or 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,25 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; | ||
|
||
sentryTest('should not add source context lines to errors from script files', async ({ getLocalTestPath, page }) => { | ||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
const eventReqPromise = waitForErrorRequestOnUrl(page, url); | ||
|
||
const clickPromise = page.click('#script-error-btn'); | ||
|
||
const [req] = await Promise.all([eventReqPromise, clickPromise]); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
|
||
const exception = eventData.exception?.values?.[0]; | ||
const frames = exception?.stacktrace?.frames; | ||
expect(frames).toHaveLength(1); | ||
frames?.forEach(f => { | ||
expect(f).not.toHaveProperty('pre_context'); | ||
expect(f).not.toHaveProperty('context_line'); | ||
expect(f).not.toHaveProperty('post_context'); | ||
}); | ||
}); |
17 changes: 17 additions & 0 deletions
17
packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/template.html
This file contains hidden or 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 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<script> | ||
function throwTestError() { | ||
throw new Error('Error with context lines') | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<button id="inline-error-btn" onclick="throwTestError()">Click me</button> | ||
</body> | ||
<footer> | ||
Some text... | ||
</foot> | ||
</html> |
82 changes: 82 additions & 0 deletions
82
packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts
This file contains hidden or 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,82 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; | ||
|
||
sentryTest( | ||
'should add source context lines around stack frames from errors in Html script tags', | ||
async ({ getLocalTestPath, page, browserName }) => { | ||
if (browserName === 'webkit') { | ||
// The error we're throwing in this test is thrown as "Script error." in Webkit. | ||
// We filter "Script error." out by default in `InboundFilters`. | ||
// I don't think there's much value to disable InboundFilters defaults for this test, | ||
// given that most of our users won't do that either. | ||
// Let's skip it instead for Webkit. | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestPath({ testDir: __dirname }); | ||
|
||
const eventReqPromise = waitForErrorRequestOnUrl(page, url); | ||
|
||
const clickPromise = page.click('#inline-error-btn'); | ||
|
||
const [req] = await Promise.all([eventReqPromise, clickPromise]); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
|
||
expect(eventData.exception?.values).toHaveLength(1); | ||
|
||
const exception = eventData.exception?.values?.[0]; | ||
|
||
expect(exception).toMatchObject({ | ||
stacktrace: { | ||
frames: [ | ||
{ | ||
lineno: 12, | ||
pre_context: [ | ||
' <script>', | ||
' function throwTestError() {', | ||
" throw new Error('Error with context lines')", | ||
' }', | ||
' </script>', | ||
' </head>', | ||
' <body>', | ||
], | ||
context_line: ' <button id="inline-error-btn" onclick="throwTestError()">Click me</button>', | ||
post_context: [ | ||
expect.stringContaining('<script'), // this line varies in the test based on tarball/cdn bundle (+variants) | ||
' <footer>', | ||
' Some text...', | ||
' ', | ||
'', | ||
'</footer></body>', | ||
'</html>', | ||
], | ||
}, | ||
{ | ||
lineno: 7, | ||
pre_context: [ | ||
'<!DOCTYPE html>', | ||
'<html>', | ||
'<head>', | ||
' <meta charset="utf-8">', | ||
' <script>', | ||
' function throwTestError() {', | ||
], | ||
context_line: " throw new Error('Error with context lines')", | ||
post_context: [ | ||
' }', | ||
' </script>', | ||
' </head>', | ||
' <body>', | ||
' <button id="inline-error-btn" onclick="throwTestError()">Click me</button>', | ||
expect.stringContaining('<script'), // this line varies in the test based on tarball/cdn bundle (+variants) | ||
' <footer>', | ||
], | ||
}, | ||
], | ||
}, | ||
}); | ||
}, | ||
); |
This file contains hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.