-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
meta(changelog): Update changelog for 9.37.0 #16892
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
Changes from all commits
bd6095c
c36e75b
a5173b7
60063e8
b8e7422
29bf0d2
7bc6bd0
ccb129b
68eef54
501e442
2a7a74b
3e5eac5
5534ba9
5356feb
ca28a7b
0df39c6
1864b22
1ad6d58
7a8840d
affebb4
e2ca660
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,30 @@ | |
|
||
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott | ||
|
||
## 9.37.0 | ||
|
||
### Important Changes | ||
|
||
- **feat(nuxt): Parametrize SSR routes ([#16843](https://github.com/getsentry/sentry-javascript/pull/16843))** | ||
|
||
When requesting dynamic or catch-all routes in Nuxt, those will now be shown as parameterized routes in Sentry. | ||
For example, `/users/123` will be shown as `/users/:userId()` in Sentry. This will make it easier to identify patterns and make grouping easier. | ||
|
||
### Other Changes | ||
|
||
- feat(astro): Deprecate passing runtime config to astro integration ([#16839](https://github.com/getsentry/sentry-javascript/pull/16839)) | ||
- feat(browser): Add `beforeStartNavigationSpan` lifecycle hook ([#16863](https://github.com/getsentry/sentry-javascript/pull/16863)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. l: Maybe we should highlight this as an important change and add a snippet for how to use it, wdyt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Lms24 I am not sure here but I think those hooks are mainly meant for our SDK internally? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, they're internally mostly. no need for an important change |
||
- feat(browser): Detect redirects when emitting navigation spans ([#16324](https://github.com/getsentry/sentry-javascript/pull/16324)) | ||
- feat(cloudflare): Add option to opt out of capturing errors in `wrapRequestHandler` ([#16852](https://github.com/getsentry/sentry-javascript/pull/16852)) | ||
- feat(feedback): Return the eventId into the onSubmitSuccess callback ([#16835](https://github.com/getsentry/sentry-javascript/pull/16835)) | ||
- feat(vercel-edge): Do not vendor in all OpenTelemetry dependencies ([#16841](https://github.com/getsentry/sentry-javascript/pull/16841)) | ||
- fix(browser): Ensure standalone CLS and LCP spans have traceId of pageload span ([#16864](https://github.com/getsentry/sentry-javascript/pull/16864)) | ||
- fix(nextjs): Use value injection loader on `instrumentation-client.ts|js` ([#16855](https://github.com/getsentry/sentry-javascript/pull/16855)) | ||
- fix(sveltekit): Avoid capturing `redirect()` calls as errors in Cloudflare ([#16853](https://github.com/getsentry/sentry-javascript/pull/16853)) | ||
- docs(nextjs): Update `deleteSourcemapsAfterUpload` jsdoc default value ([#16867](https://github.com/getsentry/sentry-javascript/pull/16867)) | ||
|
||
Work in this release was contributed by @zachkirsch. Thank you for your contribution! | ||
Comment on lines
+27
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually, we don't list docs PRs but this was added by an external contribution so I left it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove the entry but keep the attribution, but no strong opinion |
||
|
||
## 9.36.0 | ||
|
||
### Important Changes | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,4 @@ window.Sentry = Sentry; | |
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
transportOptions: { | ||
fetchOptions: { | ||
// See: https://github.com/microsoft/playwright/issues/34497 | ||
keepalive: false, | ||
}, | ||
}, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,4 @@ window.Sentry = Sentry; | |
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
transportOptions: { | ||
fetchOptions: { | ||
// See: https://github.com/microsoft/playwright/issues/34497 | ||
keepalive: false, | ||
}, | ||
}, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ window.Sentry = Sentry; | |
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [Sentry.browserTracingIntegration()], | ||
// We want to ignore redirects for this test | ||
integrations: [Sentry.browserTracingIntegration({ detectRedirects: false })], | ||
tracesSampler: ctx => { | ||
if (ctx.attributes['sentry.origin'] === 'auto.pageload.browser') { | ||
return 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,12 @@ window.Sentry = Sentry; | |
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [Sentry.browserTracingIntegration()], | ||
integrations: [Sentry.browserTracingIntegration({ idleTimeout: 2000 })], | ||
tracesSampleRate: 1, | ||
}); | ||
|
||
// Immediately navigate to a new page to abort the pageload | ||
window.history.pushState({}, '', '/sub-page'); | ||
// Navigate to a new page to abort the pageload | ||
// We have to wait >300ms to avoid the redirect handling | ||
setTimeout(() => { | ||
window.history.pushState({}, '', '/sub-page'); | ||
}, 500); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
window.Sentry = Sentry; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
integrations: [Sentry.browserTracingIntegration()], | ||
tracesSampleRate: 1, | ||
debug: true, | ||
}); | ||
|
||
document.getElementById('btn1').addEventListener('click', () => { | ||
// Trigger navigation later than click, so the last click is more than 300ms ago | ||
setTimeout(() => { | ||
window.history.pushState({}, '', '/sub-page'); | ||
|
||
// then trigger redirect inside of this navigation, which should be detected as a redirect | ||
// because the last click was more than 300ms ago | ||
setTimeout(() => { | ||
window.history.pushState({}, '', '/sub-page-redirect'); | ||
}, 100); | ||
}, 400); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<button id="btn1">Trigger navigation</button> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { expect } from '@playwright/test'; | ||
import { sentryTest } from '../../../../../utils/fixtures'; | ||
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../../utils/helpers'; | ||
|
||
sentryTest( | ||
'should create a navigation.redirect span if a click happened more than 300ms before navigation', | ||
async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
const pageloadRequestPromise = waitForTransactionRequest(page, event => event.contexts?.trace?.op === 'pageload'); | ||
const navigationRequestPromise = waitForTransactionRequest( | ||
page, | ||
event => event.contexts?.trace?.op === 'navigation', | ||
); | ||
|
||
await page.goto(url); | ||
|
||
await pageloadRequestPromise; | ||
|
||
// Now trigger navigation, and then a redirect in the navigation, with | ||
await page.click('#btn1'); | ||
|
||
const navigationRequest = envelopeRequestParser(await navigationRequestPromise); | ||
|
||
expect(navigationRequest.contexts?.trace?.op).toBe('navigation'); | ||
expect(navigationRequest.transaction).toEqual('/sub-page'); | ||
|
||
const spans = navigationRequest.spans || []; | ||
|
||
expect(spans).toContainEqual( | ||
expect.objectContaining({ | ||
op: 'navigation.redirect', | ||
description: '/sub-page-redirect', | ||
}), | ||
); | ||
}, | ||
); |
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', | ||
integrations: [Sentry.browserTracingIntegration()], | ||
tracesSampleRate: 1, | ||
debug: true, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
document.getElementById('btn1').addEventListener('click', () => { | ||
// trigger redirect immediately | ||
window.history.pushState({}, '', '/sub-page'); | ||
}); | ||
|
||
// Now trigger click, which should trigger navigation | ||
document.getElementById('btn1').click(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
</head> | ||
<button id="btn1" type="button">Trigger navigation</button> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { expect } from '@playwright/test'; | ||
import { sentryTest } from '../../../../../utils/fixtures'; | ||
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../../utils/helpers'; | ||
|
||
sentryTest( | ||
'should not create a navigation.redirect span if a click happened before navigation', | ||
async ({ getLocalTestUrl, page }) => { | ||
if (shouldSkipTracingTest()) { | ||
sentryTest.skip(); | ||
} | ||
|
||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
const pageloadRequestPromise = waitForTransactionRequest(page, event => event.contexts?.trace?.op === 'pageload'); | ||
const navigationRequestPromise = waitForTransactionRequest( | ||
page, | ||
event => event.contexts?.trace?.op === 'navigation', | ||
); | ||
|
||
await page.goto(url); | ||
|
||
const pageloadRequest = envelopeRequestParser(await pageloadRequestPromise); | ||
// Ensure a navigation span is sent, too | ||
await navigationRequestPromise; | ||
|
||
const spans = pageloadRequest.spans || []; | ||
|
||
expect(spans).not.toContainEqual( | ||
expect.objectContaining({ | ||
op: 'navigation.redirect', | ||
}), | ||
); | ||
}, | ||
); |
Uh oh!
There was an error while loading. Please reload this page.