Skip to content

Commit

Permalink
Merge pull request #14022 from getsentry/prepare-release/8.35.0
Browse files Browse the repository at this point in the history
meta(changelog): Update changelog for 8.35.0
  • Loading branch information
s1gr1d authored Oct 21, 2024
2 parents 5a5523e + f4ba039 commit 43a6afe
Show file tree
Hide file tree
Showing 128 changed files with 3,956 additions and 740 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
'examples/**',
'test/manual/**',
'types/**',
'scripts/*.js',
],
reportUnusedDisableDirectives: true,
overrides: [
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ jobs:
'tanstack-router',
'generic-ts3.8',
'node-fastify',
'node-fastify-5',
'node-hapi',
'node-nestjs-basic',
'node-nestjs-distributed-tracing',
Expand Down Expand Up @@ -1034,6 +1035,15 @@ jobs:
overwrite: true
retention-days: 7

- name: Upload E2E Test Event Dumps
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-event-dumps-job_e2e_playwright_tests-${{ matrix.test-application }}
path: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/event-dumps
overwrite: true
retention-days: 7

- name: Upload test results to Codecov
if: cancelled() == false
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
&& github.event.pull_request.author_association != 'COLLABORATOR'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'OWNER'
&& endsWith(github.actor, '[bot]') == false
&& endsWith(github.event.pull_request.user.login, '[bot]') == false
steps:
- uses: actions/checkout@v4
- name: Set up Node
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release-comment-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ jobs:
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT

- name: Comment on linked issues that are mentioned in release
if: steps.get_version.outputs.version != ''
if: |
steps.get_version.outputs.version != ''
&& !contains(steps.get_version.outputs.version, '-beta.')
&& !contains(steps.get_version.outputs.version, '-alpha.')
&& !contains(steps.get_version.outputs.version, '-rc.')
uses: getsentry/release-comment-issues-gh-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '78 KB',
limit: '78.1 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
gzip: true,
limit: '91 KB',
limit: '95 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback, metrics)',
Expand Down Expand Up @@ -138,7 +138,7 @@ module.exports = [
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
ignore: ['react/jsx-runtime'],
gzip: true,
limit: '39 KB',
limit: '39.05 KB',
},
// Vue SDK (ESM)
{
Expand Down
98 changes: 98 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,104 @@

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

## 8.35.0

### Beta release of the official Nuxt Sentry SDK

This release marks the beta release of the `@sentry/nuxt` Sentry SDK. For details on how to use it, check out the
[Sentry Nuxt SDK README](https://github.com/getsentry/sentry-javascript/tree/develop/packages/nuxt). Please reach out on
[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns.

- **feat(nuxt): Make dynamic import() wrapping default
([#13958](https://github.com/getsentry/sentry-javascript/pull/13958))** (BREAKING)
- **feat(nuxt): Add Rollup plugin to wrap server entry with `import()`
([#13945](https://github.com/getsentry/sentry-javascript/pull/13945))**

**It is no longer required to add a Node `--import` flag. Please update your start command to avoid initializing Sentry
twice (BREAKING CHANGE).** The SDK will now apply modifications during the build of your application to allow for
patching of libraries during runtime. If run into issues with this change, you can disable this behavior in your
`nuxt.config.ts` and use the `--import` flag instead:

```js
sentry: {
dynamicImportForServerEntry: false;
}
```

- **feat(nuxt): Respect user-provided source map generation settings
([#14020](https://github.com/getsentry/sentry-javascript/pull/14020))**

We now require you to explicitly enable sourcemaps for the clientside so that Sentry can un-minify your errors. We made
this change so source maps aren't accidentally leaked to the public. Enable source maps on the client as follows:

```js
export default defineNuxtConfig({
sourcemap: {
client: true,
},
});
```

- feat(nuxt): Log server instrumentation might not work in dev
([#14021](https://github.com/getsentry/sentry-javascript/pull/14021))
- feat(nuxt): Add Http `responseHook` with `waitUntil`
([#13986](https://github.com/getsentry/sentry-javascript/pull/13986))

### Important Changes

- **feat(vue): Add Pinia plugin ([#13841](https://github.com/getsentry/sentry-javascript/pull/13841))**

Support for [Pinia](https://pinia.vuejs.org/) is added in this release for `@sentry/vue`. To capture Pinia state data,
add `createSentryPiniaPlugin()` to your Pinia store:

```javascript
import { createPinia } from 'pinia';
import { createSentryPiniaPlugin } from '@sentry/vue';

const pinia = createPinia();

pinia.use(createSentryPiniaPlugin());
```

- **feat(node): Implement Sentry-specific http instrumentation
([#13763](https://github.com/getsentry/sentry-javascript/pull/13763))**

This change introduces a new `SentryHttpInstrumentation` to handle non-span related HTTP instrumentation, allowing it to
run side-by-side with OTel's `HttpInstrumentation`. This improves support for custom OTel setups and avoids conflicts
with Sentry's instrumentation. Additionally, the `spans: false` option is reintroduced for `httpIntegration` to disable
span emission while still allowing custom `HttpInstrumentation` instances (`httpIntegration({ spans: false })`).

- **feat(core): Make stream instrumentation opt-in
([#13951](https://github.com/getsentry/sentry-javascript/pull/13951))**

This change adds a new option `trackFetchStreamPerformance` to the browser tracing integration. Only when set to `true`,
Sentry will instrument streams via fetch.

### Other Changes

- feat(node): Expose `suppressTracing` API ([#13875](https://github.com/getsentry/sentry-javascript/pull/13875))
- feat(replay): Do not log "timeout while trying to read resp body" as exception
([#13965](https://github.com/getsentry/sentry-javascript/pull/13965))
- chore(node): Bump `@opentelemetry/instrumentation-express` to `0.43.0`
([#13948](https://github.com/getsentry/sentry-javascript/pull/13948))
- chore(node): Bump `@opentelemetry/instrumentation-fastify` to `0.40.0`
([#13983](https://github.com/getsentry/sentry-javascript/pull/13983))
- fix: Ensure type for `init` is correct in meta frameworks
([#13938](https://github.com/getsentry/sentry-javascript/pull/13938))
- fix(core): `.set` the `sentry-trace` header instead of `.append`ing in fetch instrumentation
([#13907](https://github.com/getsentry/sentry-javascript/pull/13907))
- fix(module): keep version for node ESM package ([#13922](https://github.com/getsentry/sentry-javascript/pull/13922))
- fix(node): Ensure `ignoreOutgoingRequests` of `httpIntegration` applies to breadcrumbs
([#13970](https://github.com/getsentry/sentry-javascript/pull/13970))
- fix(replay): Fix onError sampling when loading an expired buffered session
([#13962](https://github.com/getsentry/sentry-javascript/pull/13962))
- fix(replay): Ignore older performance entries when starting manually
([#13969](https://github.com/getsentry/sentry-javascript/pull/13969))
- perf(node): Truncate breadcrumb messages created by console integration
([#14006](https://github.com/getsentry/sentry-javascript/pull/14006))

Work in this release was contributed by @ZakrepaShe and @zhiyan114. Thank you for your contributions!

## 8.34.0

### Important Changes
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/fixtures/loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// we define sentryOnLoad in template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sentry.captureException('Test exception');
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script>
window.sentryOnLoad = function () {
Sentry.init({
tracesSampleRate: 0.123,
});

throw new Error('sentryOnLoad error');
};
</script>
</head>
<body></body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { expect } from '@playwright/test';

import { sentryTest } from '../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';

sentryTest(
'sentryOnLoad callback is called before Sentry.onLoad() and handles errors in handler',
async ({ getLocalTestUrl, page }) => {
const errors: string[] = [];

page.on('console', msg => {
if (msg.type() === 'error') {
errors.push(msg.text());
}
});

const url = await getLocalTestUrl({ testDir: __dirname });
const req = await waitForErrorRequestOnUrl(page, url);

const eventData = envelopeRequestParser(req);

expect(eventData.message).toBe('Test exception');

expect(await page.evaluate('Sentry.getClient().getOptions().tracesSampleRate')).toEqual(0.123);

expect(errors).toEqual([
'Error while calling `sentryOnLoad` handler:',
expect.stringContaining('Error: sentryOnLoad error'),
]);
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,125 @@ sentryTest(
},
);

sentryTest(
'[buffer-mode] manually starting replay ignores earlier performance entries',
async ({ getLocalTestUrl, page, browserName }) => {
// This was sometimes flaky on webkit, so skipping for now
if (shouldSkipReplayTest() || browserName === 'webkit') {
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 getLocalTestUrl({ testDir: __dirname });

await page.goto(url);

// Wait for everything to be initialized - Replay is not running yet
await page.waitForFunction('!!window.Replay');

// Wait for a second, then start replay
await new Promise(resolve => setTimeout(resolve, 1000));
await page.evaluate('window.Replay.start()');

const req0 = await reqPromise0;

const event0 = getReplayEvent(req0);
const content0 = getReplayRecordingContent(req0);

expect(event0).toEqual(
getExpectedReplayEvent({
replay_type: 'session',
}),
);

const { performanceSpans } = content0;

// Here, we test that this does not contain any web-vital etc. performance spans
// as these have been emitted _before_ the replay was manually started
expect(performanceSpans).toEqual([
{
op: 'memory',
description: 'memory',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: {
memory: {
jsHeapSizeLimit: expect.any(Number),
totalJSHeapSize: expect.any(Number),
usedJSHeapSize: expect.any(Number),
},
},
},
]);
},
);

sentryTest(
'[buffer-mode] manually starting replay ignores earlier performance entries when starting immediately',
async ({ getLocalTestUrl, page, browserName }) => {
// This was sometimes flaky on webkit, so skipping for now
if (shouldSkipReplayTest() || browserName === 'webkit') {
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 getLocalTestUrl({ testDir: __dirname });

page.goto(url);

// Wait for everything to be initialized, then start replay as soon as possible
await page.waitForFunction('!!window.Replay');
await page.evaluate('window.Replay.start()');

const req0 = await reqPromise0;

const event0 = getReplayEvent(req0);
const content0 = getReplayRecordingContent(req0);

expect(event0).toEqual(
getExpectedReplayEvent({
replay_type: 'session',
}),
);

const { performanceSpans } = content0;

expect(performanceSpans).toEqual([
{
op: 'memory',
description: 'memory',
startTimestamp: expect.any(Number),
endTimestamp: expect.any(Number),
data: {
memory: {
jsHeapSizeLimit: expect.any(Number),
totalJSHeapSize: expect.any(Number),
usedJSHeapSize: expect.any(Number),
},
},
},
]);
},
);

// Doing this in buffer mode to test changing error sample rate after first
// error happens.
sentryTest(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
integrations: [Sentry.browserTracingIntegration({ instrumentNavigation: false, instrumentPageLoad: false })],
tracesSampleRate: 1,
tracePropagationTargets: ['example.com'],
release: '1.1.1',
});
Loading

0 comments on commit 43a6afe

Please sign in to comment.