Skip to content

meta(changelog): Update changelog for 8.29.0 #13619

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 26 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
128ab44
test(browser): Add integration test for `httpContextIntegration` (#13…
Lms24 Sep 3, 2024
ce8579c
Merge pull request #13567 from getsentry/master
github-actions[bot] Sep 3, 2024
4774399
feat(node): Add `generic-pool` integration (#13465)
Zen-cronic Sep 3, 2024
b7d1544
feat(vue): Only start UI spans if parent is available (#13568)
s1gr1d Sep 3, 2024
3180113
ci: Show what size limit jobs exceeded the limit (#13532)
mydea Sep 3, 2024
f5ef470
ref: Add external contributor to CHANGELOG.md (#13569)
github-actions[bot] Sep 3, 2024
d5f9f9d
fix(replay): Fix types in WebVitalData (#13573)
c298lee Sep 3, 2024
2393064
chore(ci): Retain and upload traces on e2e-tests failures (#13562)
andreiborza Sep 3, 2024
d929462
feat(solidstart): Add `browserTracingIntegration` by default (#13561)
andreiborza Sep 3, 2024
5c05bd8
fix(utils): Keep logger on carrier (#13570)
mydea Sep 4, 2024
ec7d9e3
ci: Update size-limit to ensure bundle size optimization (#13571)
mydea Sep 4, 2024
70f938b
fix(node-fetch): Use stringified origin url (#13581)
s1gr1d Sep 4, 2024
6dc8aab
fix(cloudflare): Guard `context.waitUntil` call in request handler (#…
Lms24 Sep 4, 2024
50589cd
fix(node): Replace dashes in `generic-pool` span origins with undersc…
lforst Sep 4, 2024
63863cd
feat(nextjs): Emit warning when using turbopack (#13566)
lforst Sep 4, 2024
c4f68d8
feat(nextjs): Future-proof Next.js config options overriding (#13586)
lforst Sep 4, 2024
80ec41a
feat(nuxt): Upload sourcemaps generated by Nitro (#13382)
s1gr1d Sep 4, 2024
a69da1b
feat(node): Option to only wrap instrumented modules (#13139)
timfish Sep 5, 2024
e2213fc
feat(solidstart): Add `sentrySolidStartVite` plugin to simplify sourc…
andreiborza Sep 5, 2024
a7a8b80
chore(javascript): Update READMEs of Solid and SolidStart SDKs to ind…
andreiborza Sep 5, 2024
75aa007
ci: Fix size-limit action on develop branches (#13585)
mydea Sep 5, 2024
a8e5f59
feat(node): Update OpenTelemetry packages to instrumentation v0.53.0 …
mydea Sep 5, 2024
bdec033
fix(gatsby): Fix assets path for sourcemaps upload (#13592)
lforst Sep 6, 2024
8a8f08f
fix(nextjs): Use posix paths for sourcemap uploads (#13603)
andreiborza Sep 6, 2024
e5d1575
fix(replays): Improve replay web vital types (#13602)
c298lee Sep 6, 2024
d28a0e5
meta(changelog): Update changelog for 8.29.0
andreiborza Sep 5, 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
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,15 @@ jobs:
timeout-minutes: 5
run: pnpm test:assert

- name: Upload Playwright Traces
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-traces-job_e2e_playwright_tests-${{ matrix.test-application}}
path: dev-packages/e2e-tests/test-applications/${{ matrix.test-application}}/test-results
overwrite: true
retention-days: 7

job_optional_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
Expand Down
37 changes: 37 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ module.exports = [
gzip: true,
limit: '24 KB',
},
{
name: '@sentry/browser - with treeshaking flags',
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init'),
gzip: true,
limit: '24 KB',
modifyWebpackConfig: function (config) {
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');

config.plugins.push(
new webpack.DefinePlugin({
__SENTRY_DEBUG__: false,
__RRWEB_EXCLUDE_SHADOW_DOM__: true,
__RRWEB_EXCLUDE_IFRAME__: true,
__SENTRY_EXCLUDE_REPLAY_WORKER__: true,
}),
);

config.optimization.minimize = true;
config.optimization.minimizer = [new TerserPlugin()];

return config;
},
},
{
name: '@sentry/browser (incl. Tracing)',
path: 'packages/browser/build/npm/esm/index.js',
Expand All @@ -32,6 +57,8 @@ module.exports = [
limit: '68 KB',
modifyWebpackConfig: function (config) {
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');

config.plugins.push(
new webpack.DefinePlugin({
__SENTRY_DEBUG__: false,
Expand All @@ -40,6 +67,10 @@ module.exports = [
__SENTRY_EXCLUDE_REPLAY_WORKER__: true,
}),
);

config.optimization.minimize = true;
config.optimization.minimizer = [new TerserPlugin()];

return config;
},
},
Expand Down Expand Up @@ -222,11 +253,17 @@ module.exports = [
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
modifyWebpackConfig: function (config) {
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');

config.plugins.push(
new webpack.DefinePlugin({
__SENTRY_TRACING__: false,
}),
);

config.optimization.minimize = true;
config.optimization.minimizer = [new TerserPlugin()];

return config;
},
},
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,57 @@

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

## 8.29.0

### Important Changes

- **Beta releases of official Solid and SolidStart Sentry SDKs**

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

- **feat(node): Option to only wrap instrumented modules (#13139)**

Adds the SDK option to only wrap ES modules with `import-in-the-middle` that specifically need to be instrumented.

```javascript
import * as Sentry from '@sentry/node';

Sentry.init({
dsn: '__PUBLIC_DSN__',
registerEsmLoaderHooks: { onlyHookedModules: true },
});
```

- **feat(node): Update OpenTelemetry packages to instrumentation v0.53.0 (#13587)**

All internal OpenTelemetry instrumentation was updated to their latest version. This adds support for Mongoose v7 and v8
and fixes various bugs related to ESM mode.

### Other Changes

- feat(nextjs): Emit warning when using turbopack (#13566)
- feat(nextjs): Future-proof Next.js config options overriding (#13586)
- feat(node): Add `generic-pool` integration (#13465)
- feat(nuxt): Upload sourcemaps generated by Nitro (#13382)
- feat(solidstart): Add `browserTracingIntegration` by default (#13561)
- feat(solidstart): Add `sentrySolidStartVite` plugin to simplify source maps upload (#13493)
- feat(vue): Only start UI spans if parent is available (#13568)
- fix(cloudflare): Guard `context.waitUntil` call in request handler (#13549)
- fix(gatsby): Fix assets path for sourcemaps upload (#13592)
- fix(nextjs): Use posix paths for sourcemap uploads (#13603)
- fix(node-fetch): Use stringified origin url (#13581)
- fix(node): Replace dashes in `generic-pool` span origins with underscores (#13579)
- fix(replay): Fix types in WebVitalData (#13573)
- fix(replay): Improve replay web vital types (#13602)
- fix(utils): Keep logger on carrier (#13570)

Work in this release was contributed by @Zen-cronic. Thank you for your contribution!

## 8.28.0

### Important Changes
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"babel-loader": "^8.2.2",
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"webpack": "^5.90.3"
"webpack": "^5.94.0"
},
"devDependencies": {
"@types/glob": "8.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as Sentry from '@sentry/browser';
// Import this separately so that generatePlugin can handle it for CDN scenarios
import { feedbackIntegration } from '@sentry/browser';

const feedback = feedbackIntegration({
autoInject: false,
});

window.Sentry = Sentry;
window.feedback = feedback;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [feedback],
});

feedback.attachTo('#custom-feedback-buttom');
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<button type="button" id="custom-feedback-buttom">Show feedback!</button>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import { expect } from '@playwright/test';

import { TEST_HOST, sentryTest } from '../../../utils/fixtures';
import { envelopeRequestParser, getEnvelopeType, shouldSkipFeedbackTest } from '../../../utils/helpers';

sentryTest('should capture feedback with custom button', async ({ getLocalTestUrl, page }) => {
if (shouldSkipFeedbackTest()) {
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 getLocalTestUrl({ testDir: __dirname });

await page.goto(url);
await page.locator('#custom-feedback-buttom').click();
await page.waitForSelector(':visible:text-is("Report a Bug")');

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('[email protected]');
await page.locator('[name="message"]').fill('my example feedback');
await page.locator('[data-sentry-feedback] .btn--primary').click();

const feedbackEvent = envelopeRequestParser((await feedbackRequestPromise).request());
expect(feedbackEvent).toEqual({
type: 'feedback',
breadcrumbs: expect.any(Array),
contexts: {
feedback: {
contact_email: '[email protected]',
message: 'my example feedback',
name: 'Jane Doe',
source: 'widget',
url: `${TEST_HOST}/index.html`,
},
trace: {
trace_id: expect.stringMatching(/\w{32}/),
span_id: expect.stringMatching(/\w{16}/),
},
},
level: 'info',
timestamp: expect.any(Number),
event_id: expect.stringMatching(/\w{32}/),
environment: 'production',
tags: {},
sdk: {
integrations: expect.arrayContaining(['Feedback']),
version: expect.any(String),
name: 'sentry.javascript.browser',
packages: expect.anything(),
},
request: {
url: `${TEST_HOST}/index.html`,
headers: {
'User-Agent': expect.stringContaining(''),
},
},
platform: 'javascript',
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as Sentry from '@sentry/browser';
// Import this separately so that generatePlugin can handle it for CDN scenarios
import { feedbackIntegration } from '@sentry/browser';

const feedback = feedbackIntegration({
autoInject: false,
});

window.Sentry = Sentry;
window.feedback = feedback;

Sentry.init({
dsn: 'https://[email protected]/1337',
debug: true,
integrations: [feedback],
});

// This should log an error!
feedback.attachTo('#does-not-exist');
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { expect } from '@playwright/test';

import { sentryTest } from '../../../utils/fixtures';
import { shouldSkipFeedbackTest } from '../../../utils/helpers';

/**
* This test is mostly relevant for ensuring that the logger works in all combinations of CDN bundles.
* Even if feedback is included via the CDN, this test ensures that the logger is working correctly.
*/
sentryTest('should log error correctly', async ({ getLocalTestUrl, page }) => {
// In minified bundles we do not have logger messages, so we skip the test
if (shouldSkipFeedbackTest() || (process.env.PW_BUNDLE || '').includes('_min')) {
sentryTest.skip();
}

const messages: string[] = [];

page.on('console', message => {
messages.push(message.text());
});

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

expect(messages).toContain('Sentry Logger [log]: Integration installed: Feedback');
expect(messages).toContain('Sentry Logger [error]: [Feedback] Unable to attach to target element');
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

const integrations = Sentry.getDefaultIntegrations({}).filter(
defaultIntegration => defaultIntegration.name === 'HttpContext',
);

const client = new Sentry.BrowserClient({
dsn: 'https://[email protected]/1337',
transport: Sentry.makeFetchTransport,
stackParser: Sentry.defaultStackParser,
integrations: integrations,
});

const scope = new Sentry.Scope();
scope.setClient(client);
client.init();

window._sentryScope = scope;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window._sentryScope.captureException(new Error('client init'));
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

import { sentryTest } from '../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers';

sentryTest('httpContextIntegration captures user-agent and referrer', async ({ getLocalTestPath, page }) => {
const url = await getLocalTestPath({ testDir: __dirname });

const errorEventPromise = getFirstSentryEnvelopeRequest<Event>(page);

// Simulate document.referrer being set to test full functionality of the integration
await page.goto(url, { referer: 'https://sentry.io/' });

const errorEvent = await errorEventPromise;

expect(errorEvent.exception?.values).toHaveLength(1);

expect(errorEvent.request).toEqual({
headers: {
'User-Agent': expect.any(String),
Referer: 'https://sentry.io/',
},
url: expect.any(String),
});
});

This file was deleted.

This file was deleted.

Loading
Loading