Skip to content

meta(changelog): Update changelog for 8.34.0 #13941

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 33 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
df0d19a
feat(nuxt): Add E2E test for Nuxt 4 preview (#13799)
s1gr1d Oct 3, 2024
fb61f57
Merge remote-tracking branch 'origin/develop' into lforst-master-deve…
lforst Oct 4, 2024
db77c11
Merge pull request #13865 from getsentry/lforst-master-develop-sync-8…
lforst Oct 4, 2024
d891e06
fix(wasm): Integration wasm uncaught WebAssembly.Exception (#13787) (…
trzeciak Oct 4, 2024
5822d12
fix(test): Fix flaky amqplib test (#13860)
onurtemizkan Oct 4, 2024
444d2fe
fix(node): Remove `dataloader` instrumentation from default integrati…
onurtemizkan Oct 4, 2024
0d42ae8
fix(node): Local variables handle error (#13827)
timfish Oct 4, 2024
a52f415
ref: Add external contributor to CHANGELOG.md (#13867)
github-actions[bot] Oct 7, 2024
be87573
feat(cdn): Export `getReplay` in replay CDN bundles (#13881)
mydea Oct 7, 2024
bff6b13
ci(deps): bump dkhunt27/action-nx-affected-list from 5.3 to 6.1 (#13845)
dependabot[bot] Oct 7, 2024
21a01f8
docs: Fix google-cloud-serverless URL in readme (#13876)
lizhiyao Oct 7, 2024
c2c8be9
ci: Use PAT for external contributor PR (#13888)
mydea Oct 7, 2024
90c9d7e
chore(replay): Update worker example & script (#13882)
mydea Oct 7, 2024
0c560a5
ref: Add external contributor to CHANGELOG.md (#13883)
github-actions[bot] Oct 7, 2024
3f0926e
fix(docs): Correct supported browsers due to `globalThis` (#13788)
timfish Oct 7, 2024
05a368f
ref(utils): Move `vercelWaitUntil` to utils (#13891)
s1gr1d Oct 7, 2024
0b651ff
ref(nextjs): Ignore sentry spans based on query param attribute (#13905)
lforst Oct 8, 2024
48b3a78
fix(nextjs): Drop `_not-found` spans for all HTTP methods (#13906)
lforst Oct 8, 2024
4ad2c35
fix(node): Ensure graphql options are correct when preloading (#13769)
mydea Oct 8, 2024
bd96876
ref(nextjs): Remove dead code (#13903)
lforst Oct 8, 2024
067ad93
fix(replay): Ensure `replay_id` is removed from frozen DSC when stopp…
mydea Oct 8, 2024
8b1b64c
fix(nuxt): Create declaration files for Nuxt module (#13909)
s1gr1d Oct 8, 2024
5929a1b
fix(sveltekit): Ensure trace meta tags are always injected (#13231)
Lms24 Oct 8, 2024
2c3f09c
fix(replay): Try/catch `sendBufferedReplayOrFlush` to prevent cycles …
billyvg Oct 8, 2024
ed2e556
fix(sveltekit): Update `wrapServerRouteWithSentry` to respect ParamMa…
gurpreetatwal Oct 9, 2024
37b45c1
feat(replay): Clear fallback buffer when switching buffers (#13914)
billyvg Oct 9, 2024
d7c33a2
feat(replay): Upgrade rrweb packages to 2.28.0 (#13732)
billyvg Oct 9, 2024
0be3137
fix(nextjs): Adjust path to `requestAsynStorageShim.js` template file…
Lms24 Oct 10, 2024
6b4401f
fix(nextjs): Detect new locations for request async storage to suppor…
ykzts Oct 10, 2024
0b00605
ci(deps): bump peter-evans/create-pull-request from 6.1.0 to 7.0.5 (#…
dependabot[bot] Oct 10, 2024
fcc3d2b
meta(ci): Don't fail CI run when codecov fails to upload (#13930)
lforst Oct 10, 2024
86c626e
fix(nextjs): Fix resolution of request storage shim fallback (#13929)
lforst Oct 10, 2024
20914b0
meta(changelog): Update changelog for 8.34.0
lforst Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
id: install_dependencies

- name: Check for Affected Nx Projects
uses: dkhunt27/action-nx-affected-list@v5.3
uses: dkhunt27/action-nx-affected-list@v6.1
id: checkForAffected
if: github.event_name == 'pull_request'
with:
Expand Down Expand Up @@ -611,6 +611,7 @@ jobs:

- name: Upload test results to Codecov
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
with:
directory: dev-packages/browser-integration-tests
Expand Down Expand Up @@ -671,6 +672,7 @@ jobs:

- name: Upload test results to Codecov
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
with:
directory: dev-packages/browser-integration-tests
Expand Down Expand Up @@ -915,6 +917,7 @@ jobs:
'sveltekit',
'sveltekit-2',
'sveltekit-2-svelte-5',
'sveltekit-2-twp',
'tanstack-router',
'generic-ts3.8',
'node-fastify',
Expand All @@ -931,6 +934,7 @@ jobs:
'node-koa',
'node-connect',
'nuxt-3',
'nuxt-4',
'vue-3',
'webpack-4',
'webpack-5'
Expand Down Expand Up @@ -1032,6 +1036,7 @@ jobs:

- name: Upload test results to Codecov
if: cancelled() == false
continue-on-error: true
uses: codecov/test-results-action@v1
with:
directory: dev-packages/e2e-tests
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ jobs:
author_association: ${{ github.event.pull_request.author_association }}

- name: Create PR with changes
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
with:
# This token is scoped to Daniel Griesser
# If we used the default GITHUB_TOKEN, the resulting PR would not trigger CI :(
token: ${{ secrets.REPO_SCOPED_TOKEN }}
commit-message: "ref: Add external contributor to CHANGELOG.md"
title: "ref: Add external contributor to CHANGELOG.md"
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ module.exports = [
name: 'CDN Bundle (incl. Tracing, Replay)',
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: true,
limit: '73 KB',
limit: '74 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
Expand Down
60 changes: 55 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,56 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

## 8.34.0

### Important Changes

- **ref(nextjs): Remove dead code ([#13828](https://github.com/getsentry/sentry-javascript/pull/13903))**

Relevant for users of the `@sentry/nextjs` package: If you have previously configured a
`SENTRY_IGNORE_API_RESOLUTION_ERROR` environment variable, it is now safe to unset it.

### Other Changes

- feat(cdn): Export `getReplay` in replay CDN bundles
([#13881](https://github.com/getsentry/sentry-javascript/pull/13881))
- feat(replay): Clear fallback buffer when switching buffers
([#13914](https://github.com/getsentry/sentry-javascript/pull/13914))
- feat(replay): Upgrade rrweb packages to 2.28.0 ([#13732](https://github.com/getsentry/sentry-javascript/pull/13732))
- fix(docs): Correct supported browsers due to `globalThis`
([#13788](https://github.com/getsentry/sentry-javascript/pull/13788))
- fix(nextjs): Adjust path to `requestAsyncStorageShim.js` template file
([#13928](https://github.com/getsentry/sentry-javascript/pull/13928))
- fix(nextjs): Detect new locations for request async storage to support Next.js v15.0.0-canary.180 and higher
([#13920](https://github.com/getsentry/sentry-javascript/pull/13920))
- fix(nextjs): Drop `_not-found` spans for all HTTP methods
([#13906](https://github.com/getsentry/sentry-javascript/pull/13906))
- fix(nextjs): Fix resolution of request storage shim fallback
([#13929](https://github.com/getsentry/sentry-javascript/pull/13929))
- fix(node): Ensure graphql options are correct when preloading
([#13769](https://github.com/getsentry/sentry-javascript/pull/13769))
- fix(node): Local variables handle error ([#13827](https://github.com/getsentry/sentry-javascript/pull/13827))
- fix(node): Remove `dataloader` instrumentation from default integrations
([#13873](https://github.com/getsentry/sentry-javascript/pull/13873))
- fix(nuxt): Create declaration files for Nuxt module
([#13909](https://github.com/getsentry/sentry-javascript/pull/13909))
- fix(replay): Ensure `replay_id` is removed from frozen DSC when stopped
([#13893](https://github.com/getsentry/sentry-javascript/pull/13893))
- fix(replay): Try/catch `sendBufferedReplayOrFlush` to prevent cycles
([#13900](https://github.com/getsentry/sentry-javascript/pull/13900))
- fix(sveltekit): Ensure trace meta tags are always injected
([#13231](https://github.com/getsentry/sentry-javascript/pull/13231))
- fix(sveltekit): Update `wrapServerRouteWithSentry` to respect ParamMatchers
([#13390](https://github.com/getsentry/sentry-javascript/pull/13390))
- fix(wasm): Integration wasm uncaught WebAssembly.Exception
([#13787](https://github.com/getsentry/sentry-javascript/pull/13787)) (#13854)
- ref(nextjs): Ignore sentry spans based on query param attribute
([#13905](https://github.com/getsentry/sentry-javascript/pull/13905))
- ref(utils): Move `vercelWaitUntil` to utils ([#13891](https://github.com/getsentry/sentry-javascript/pull/13891))

Work in this release was contributed by @trzeciak, @gurpreetatwal, @ykzts and @lizhiyao. Thank you for your
contributions!

## 8.33.1

- fix(core): Update trpc middleware types ([#13859](https://github.com/getsentry/sentry-javascript/pull/13859))
Expand Down Expand Up @@ -1158,12 +1208,12 @@ with full support for ESM-based node apps using **Node.js 18.19.0 or higher**.
[**ES2018+**](https://caniuse.com/?feats=mdn-javascript_builtins_regexp_dotall,js-regexp-lookbehind,mdn-javascript_builtins_regexp_named_capture_groups,mdn-javascript_builtins_regexp_property_escapes,mdn-javascript_builtins_symbol_asynciterator,mdn-javascript_functions_method_definitions_async_generator_methods,mdn-javascript_grammar_template_literals_template_literal_revision,mdn-javascript_operators_destructuring_rest_in_objects,mdn-javascript_operators_destructuring_rest_in_arrays,promise-finally)
compatible browsers. New minimum browser versions:

- Chrome 63
- Chrome 71
- Edge 79
- Safari/iOS Safari 12
- Firefox 58
- Opera 50
- Samsung Internet 8.2
- Safari 12.1, iOS Safari 12.2
- Firefox 65
- Opera 58
- Samsung Internet 10

For more details, please see the
[version support section in our migration guide](./MIGRATION.md#1-version-support-changes).
Expand Down
18 changes: 10 additions & 8 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ higher. Lower versions may continue to work, but may not support all features (e
applies to `@sentry/node` and all of our node-based server-side sdks (`@sentry/nextjs`, `@sentry/serverless`, etc.). We
no longer test against Node 8, 10, or 12 and cannot guarantee that the SDK will work as expected on these versions.

**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2018+ compatible
browsers. This means that we no longer support IE11 (end of an era). This also means that the Browser SDK requires the
fetch API to be available in the environment.
**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2018+
compatibility plus support for
[`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis). This means
that we no longer support IE11 (end of an era). This also means that the Browser SDK requires the fetch API to be
available in the environment.

New minimum supported browsers:

- Chrome 63
- Chrome 71
- Edge 79
- Safari/iOS Safari 12
- Firefox 58
- Opera 50
- Samsung Internet 8.2
- Safari 12.1, iOS Safari 12.2
- Firefox 65
- Opera 58
- Samsung Internet 10

For IE11 support please transpile your code to ES5 using babel or similar and add required polyfills.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
- [`@sentry/aws-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/aws-serverless): SDK
for AWS Lambda Functions
- [`@sentry/google-cloud-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud):
- [`@sentry/google-cloud-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud-serverless):
SDK for Google Cloud Functions
- [`@sentry/electron`](https://github.com/getsentry/sentry-electron): SDK for Electron with support for native crashes
- [`@sentry/react-native`](https://github.com/getsentry/sentry-react-native): SDK for React Native with support for
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as Sentry from '@sentry/browser';

window._triggerError = function (errorCount) {
Sentry.captureException(new Error(`This is error #${errorCount}`));
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import type * as Sentry from '@sentry/browser';
import type { EventEnvelopeHeaders } from '@sentry/types';

import { sentryTest } from '../../../utils/fixtures';
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers';
import {
envelopeRequestParser,
shouldSkipTracingTest,
waitForErrorRequest,
waitForTransactionRequest,
} from '../../../utils/helpers';
import { getReplaySnapshot, shouldSkipReplayTest, waitForReplayRunning } from '../../../utils/replayHelpers';

type TestWindow = Window & {
Expand Down Expand Up @@ -216,3 +221,77 @@ sentryTest(
});
},
);

sentryTest('should add replay_id to error DSC while replay is active', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
sentryTest.skip();
}

const hasTracing = !shouldSkipTracingTest();

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);

const error1Req = waitForErrorRequest(page, event => event.exception?.values?.[0].value === 'This is error #1');
const error2Req = waitForErrorRequest(page, event => event.exception?.values?.[0].value === 'This is error #2');

// We want to wait for the transaction to be done, to ensure we have a consistent test
const transactionReq = hasTracing ? waitForTransactionRequest(page) : Promise.resolve();

// Wait for this to be available
await page.waitForFunction('!!window.Replay');

// We have to start replay before we finish the transaction, otherwise the DSC will not be frozen with the Replay ID
await page.evaluate('window.Replay.start();');
await waitForReplayRunning(page);
await transactionReq;

await page.evaluate('window._triggerError(1)');

const error1Header = envelopeRequestParser(await error1Req, 0) as EventEnvelopeHeaders;
const replay = await getReplaySnapshot(page);

expect(replay.session?.id).toBeDefined();

expect(error1Header.trace).toBeDefined();
expect(error1Header.trace).toEqual({
environment: 'production',
trace_id: expect.any(String),
public_key: 'public',
replay_id: replay.session?.id,
...(hasTracing
? {
sample_rate: '1',
sampled: 'true',
}
: {}),
});

// Now end replay and trigger another error, it should not have a replay_id in DSC anymore
await page.evaluate('window.Replay.stop();');
await page.waitForFunction('!window.Replay.getReplayId();');
await page.evaluate('window._triggerError(2)');

const error2Header = envelopeRequestParser(await error2Req, 0) as EventEnvelopeHeaders;

expect(error2Header.trace).toBeDefined();
expect(error2Header.trace).toEqual({
environment: 'production',
trace_id: expect.any(String),
public_key: 'public',
...(hasTracing
? {
sample_rate: '1',
sampled: 'true',
}
: {}),
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,38 @@ const META_TAG_PARENT_SPAN_ID = '1234567890123456';
const META_TAG_BAGGAGE =
'sentry-trace_id=12345678901234567890123456789012,sentry-public_key=public,sentry-release=1.0.0,sentry-environment=prod';

sentryTest('error on initial page has traceId from meta tag', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);

const errorEventPromise = getFirstSentryEnvelopeRequest<EventAndTraceHeader>(
page,
undefined,
eventAndTraceHeaderRequestParser,
);

await page.locator('#errorBtn').click();
const [errorEvent, errorTraceHeader] = await errorEventPromise;

expect(errorEvent.type).toEqual(undefined);
expect(errorEvent.contexts?.trace).toEqual({
trace_id: META_TAG_TRACE_ID,
parent_span_id: META_TAG_PARENT_SPAN_ID,
span_id: expect.stringMatching(/^[0-9a-f]{16}$/),
});

expect(errorTraceHeader).toEqual({
environment: 'prod',
public_key: 'public',
release: '1.0.0',
trace_id: META_TAG_TRACE_ID,
});
});

sentryTest('error has new traceId after navigation', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
Expand Down
12 changes: 10 additions & 2 deletions dev-packages/browser-integration-tests/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export async function waitForTransactionRequestOnUrl(page: Page, url: string): P
return req;
}

export function waitForErrorRequest(page: Page): Promise<Request> {
export function waitForErrorRequest(page: Page, callback?: (event: Event) => boolean): Promise<Request> {
return page.waitForRequest(req => {
const postData = req.postData();
if (!postData) {
Expand All @@ -209,7 +209,15 @@ export function waitForErrorRequest(page: Page): Promise<Request> {
try {
const event = envelopeRequestParser(req);

return !event.type;
if (event.type) {
return false;
}

if (callback) {
return callback(event);
}

return true;
} catch {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/node": "18.11.17",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"next": "15.0.0-canary.112",
"next": "15.0.0-canary.182",
"react": "beta",
"react-dom": "beta",
"typescript": "4.9.5"
Expand Down
24 changes: 24 additions & 0 deletions dev-packages/e2e-tests/test-applications/nuxt-4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
2 changes: 2 additions & 0 deletions dev-packages/e2e-tests/test-applications/nuxt-4/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Loading
Loading