Skip to content

Commit

Permalink
Merge pull request #14184 from getsentry/prepare-release/8.37.0
Browse files Browse the repository at this point in the history
meta: Update Changelog for 8.37.0
  • Loading branch information
Lms24 authored Nov 5, 2024
2 parents 94cd96f + ad42711 commit 765de25
Show file tree
Hide file tree
Showing 260 changed files with 2,619 additions and 1,530 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ jobs:
'react-router-6',
'solid',
'solidstart',
'solidstart-spa',
'svelte-5',
'sveltekit',
'sveltekit-2',
Expand Down
20 changes: 3 additions & 17 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration'),
gzip: true,
limit: '36 KB',
limit: '36.5 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay)',
Expand Down Expand Up @@ -88,20 +88,6 @@ module.exports = [
gzip: true,
limit: '95 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback, metrics)',
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration', 'metrics'),
gzip: true,
limit: '100 KB',
},
{
name: '@sentry/browser (incl. metrics)',
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'metrics'),
gzip: true,
limit: '30 KB',
},
{
name: '@sentry/browser (incl. Feedback)',
path: 'packages/browser/build/npm/esm/index.js',
Expand Down Expand Up @@ -138,7 +124,7 @@ module.exports = [
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
ignore: ['react/jsx-runtime'],
gzip: true,
limit: '39.05 KB',
limit: '39.5 KB',
},
// Vue SDK (ESM)
{
Expand Down Expand Up @@ -224,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '39.1 KB',
limit: '40 KB',
},
// SvelteKit SDK (ESM)
{
Expand Down
16 changes: 1 addition & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"editor.formatOnType": true,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.rulers": [120],
"editor.tabSize": 2,
"files.autoSave": "onWindowChange",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"search.exclude": {
Expand All @@ -15,11 +10,6 @@
"**/yarn-error.log": true
},
"typescript.tsdk": "./node_modules/typescript/lib",
"[json]": {
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"editor.formatOnSave": false
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand All @@ -35,12 +25,8 @@
}
],
"deno.enablePaths": ["packages/deno/test"],
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit"
},
"editor.defaultFormatter": "biomejs.biome",
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cSpell.words": ["arrayify", "OTEL"]
}
}
50 changes: 50 additions & 0 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.37.0

### Important CHanges

- **feat(nuxt): Add `piniaIntegration` ([#14138](https://github.com/getsentry/sentry-javascript/pull/14138))**

The Nuxt SDK now allows you to track Pinia state for captured errors. To enable the Pinia plugin, add the `piniaIntegration` to your client config:

```ts
// sentry.client.config.ts
import { usePinia } from '#imports';

Sentry.init({
integrations: [
Sentry.piniaIntegration(usePinia(), {
/* optional Pinia plugin options */
}),
],
});
```

- **feat: Deprecate metrics API ([#14157](https://github.com/getsentry/sentry-javascript/pull/14157))**

The Sentry Metrics beta has ended in favour of revisiting metrics in another form at a later date.

This new approach will include different APIs, making the current metrics API unnecessary. This release
deprecates the metrics API with the plan to remove in the next SDK major version. If you currently use the
metrics API in your code, you can safely continue to do so but sent data will no longer be processed by Sentry.

[Learn more](https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Ended-on-October-7th) about the end of the Metrics beta.

### Other Changes

- feat(browser): Add `http.response_delivery_type` attribute to resource spans ([#14056](https://github.com/getsentry/sentry-javascript/pull/14056))
- feat(browser): Add `skipBrowserExtensionCheck` escape hatch option ([#14147](https://github.com/getsentry/sentry-javascript/pull/14147))
- feat(deps): Bump @opentelemetry/instrumentation from 0.53.0 to 0.54.0 ([#14174](https://github.com/getsentry/sentry-javascript/pull/14174))
- feat(deps): Bump @opentelemetry/instrumentation-fastify from 0.40.0 to 0.41.0 ([#14175](https://github.com/getsentry/sentry-javascript/pull/14175))
- feat(deps): Bump @opentelemetry/instrumentation-graphql from 0.43.0 to 0.44.0 ([#14173](https://github.com/getsentry/sentry-javascript/pull/14173))
- feat(deps): Bump @opentelemetry/instrumentation-mongodb from 0.47.0 to 0.48.0 ([#14171](https://github.com/getsentry/sentry-javascript/pull/14171))
- feat(deps): Bump @opentelemetry/propagator-aws-xray from 1.25.1 to 1.26.0 ([#14172](https://github.com/getsentry/sentry-javascript/pull/14172))
- feat(nuxt): Add `asyncFunctionReExports` to define re-exported server functions ([#14104](https://github.com/getsentry/sentry-javascript/pull/14104))
- feat(nuxt): Add `piniaIntegration` ([#14138](https://github.com/getsentry/sentry-javascript/pull/14138))
- fix(browser): Avoid recording long task spans starting before their parent span ([#14183](https://github.com/getsentry/sentry-javascript/pull/14183))
- fix(core): Ensure errors thrown in async cron jobs bubble up ([#14182](https://github.com/getsentry/sentry-javascript/pull/14182))
- fix(core): Silently fail `maybeInstrument` ([#14140](https://github.com/getsentry/sentry-javascript/pull/14140))
- fix(nextjs): Resolve path for dynamic webpack import ([#13751](https://github.com/getsentry/sentry-javascript/pull/13751))
- fix(node): Make sure `modulesIntegration` does not crash esm apps ([#14169](https://github.com/getsentry/sentry-javascript/pull/14169))

Work in this release was contributed by @rexxars. Thank you for your contribution!

## 8.36.0

### Important Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Sentry.init({
integrations: [feedback],
});

feedback.attachTo('#custom-feedback-buttom');
feedback.attachTo('#custom-feedback-button');
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<meta charset="utf-8" />
</head>
<body>
<button type="button" id="custom-feedback-buttom">Show feedback!</button>
<button type="button" id="custom-feedback-button">Show feedback!</button>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sentryTest('should capture feedback with custom button', async ({ getLocalTestUr
const url = await getLocalTestUrl({ testDir: __dirname });

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

expect(await page.locator(':visible:text-is("Report a Bug")').count()).toEqual(1);
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;

// We mock this here to simulate a Chrome browser extension
window.chrome = { runtime: { id: 'mock-extension-id' } };

Sentry.init({
dsn: 'https://[email protected]/1337',
skipBrowserExtensionCheck: true,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { expect } from '@playwright/test';
import { sentryTest } from '../../../utils/fixtures';

sentryTest(
'initializes inside a Chrome browser extension if `skipBrowserExtensionCheck` is set',
async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);

const isInitialized = await page.evaluate(() => {
return !!(window as any).Sentry.isInitialized();
});

expect(isInitialized).toBe(true);
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sentryTest(
'should catch onerror calls with non-string first argument gracefully',
async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sentryTest(
'should NOT catch an exception already caught [but rethrown] via Sentry.captureException',
async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../.

sentryTest('should catch syntax errors', async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../.

sentryTest('should catch thrown errors', async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../.

sentryTest('should catch thrown objects', async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../.

sentryTest('should catch thrown strings', async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
async function run() {
Sentry.startSpan({ name: 'parent_span' }, () => {
Sentry.startSpan({ name: 'child_span', attributes: { someAttribute: '' } }, () => {
// whatever a user would do here
});
});
}

(async () => {
await run();
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { expect } from '@playwright/test';

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

sentryTest('sends an empty string attribute', async ({ getLocalTestPath, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });
const req = await waitForTransactionRequestOnUrl(page, url);
const transaction = envelopeRequestParser(req);

const childSpan = transaction.spans?.[0];
expect(childSpan?.data?.someAttribute).toBe('');
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sentryTest(
'should capture an error within a sync startSpan callback',
async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Sentry.init({

window.Replay._replay.timeouts = {
sessionIdlePause: 1000, // this is usually 5min, but we want to test this with shorter times
sessionIdleExpire: 900000, // defayult: 15min
sessionIdleExpire: 900000, // default: 15min
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sentryTest(
const spans = [...res0.performanceSpans, ...res1.performanceSpans];
expect(breadcrumbs.filter(breadcrumb => breadcrumb.category === 'replay.throttled').length).toBe(1);
// replay.throttled breadcrumb does *not* use the throttledAddEvent as we
// alwants want that breadcrumb to be present in replay
// always want that breadcrumb to be present in replay
expect(breadcrumbs.length + spans.length).toBe(THROTTLE_LIMIT + 1);
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sentryTest(
'should put the pageload transaction name onto an error event caught during pageload',
async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
// This test fails on Webkit as errors thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const blockUI = e => {
const startTime = Date.now();

function getElasped() {
function getElapsed() {
const time = Date.now();
return time - startTime;
}

while (getElasped() < 70) {
while (getElapsed() < 70) {
//
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(() => {
const startTime = Date.now();

function getElasped() {
function getElapsed() {
const time = Date.now();
return time - startTime;
}

while (getElasped() < 101) {
while (getElapsed() < 101) {
//
}
})();
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(() => {
const startTime = Date.now();

function getElasped() {
function getElapsed() {
const time = Date.now();
return time - startTime;
}

while (getElasped() < 101) {
while (getElapsed() < 101) {
//
}
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [
Sentry.browserTracingIntegration({
idleTimeout: 9000,
enableLongAnimationFrame: false,
instrumentPageLoad: false,
instrumentNavigation: true,
enableInp: false,
enableLongTask: true,
}),
],
tracesSampleRate: 1,
debug: true,
});
Loading

0 comments on commit 765de25

Please sign in to comment.