Skip to content

meta(changelog): Update CHANGELOG for 7.51.0 #8042

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 30 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5169c2f
test(e2e): Avoid race condition with event proxy (#7965)
Apr 26, 2023
90aa41b
chore(e2e): Remove yarn.lock from e2e test apps (#7977)
AbhiPrasad Apr 26, 2023
80ee8f8
feat(perf-issues): Replace sentence style keys with snake case
narsaynorath Apr 26, 2023
0a177f6
Merge pull request #7981 from getsentry/master
github-actions[bot] Apr 27, 2023
2b27989
test(loader): Update loader based (#7971)
mydea Apr 27, 2023
9a43383
Merge branch 'develop' into nar/feat/replace-sentence-style-browser-s…
narsaynorath Apr 27, 2023
cc61369
test(sveltekit): Add e2e build test for sveltekit (#7881)
AbhiPrasad Apr 27, 2023
286c00a
http.transfer_size -> http.response_transfer_size
narsaynorath Apr 27, 2023
62c57a6
Merge pull request #7978 from getsentry/nar/feat/replace-sentence-sty…
narsaynorath Apr 27, 2023
646b54d
ref(replay): Move earliest timestamp tracking to eventBuffer (#7983)
mydea Apr 28, 2023
7163fdb
ref(replay): Explicitly clear eventBuffer for checkout events (#7989)
mydea May 2, 2023
6bd2637
feat(tracing): Use http.method for span data (#7990)
AbhiPrasad May 2, 2023
f1c8d36
fix(tracing): Don't set method multiple times (#8014)
AbhiPrasad May 3, 2023
f08811e
feat(tracing): add body size for fetch requests (#7935)
DominikB2014 May 3, 2023
25c6fbf
feat(browser): Export makeMultiplexedTransport from browser SDK (#8012)
AbhiPrasad May 3, 2023
86f7cdf
test(replay): Unflake test (#8010)
mydea May 3, 2023
5897454
test(e2e): Send `qa` environment to avoid transacitons from being dyn…
May 3, 2023
4b8cd5d
feat(node): Add `http.method` to node http spans (#7991)
AbhiPrasad May 3, 2023
cfc401e
fix(replay): Do not add replay_id to DSC while buffering (#8020)
mydea May 3, 2023
5c4963d
test(loader): Ensure loader handles SDK being loaded in the meanwhile…
mydea May 3, 2023
02e1c1a
fix(utils): Normalize `undefined` to `undefined` instead of `"[undefi…
May 3, 2023
e0c3229
fix(node): Mark stack frames with url protocol as in-app frames (#8008)
May 3, 2023
184622d
fix(integrations): Handle windows paths with no prefix or backslash p…
srubin May 3, 2023
b9fb55f
fix(remix): Export `Integration` type declaration as union type (#8016)
Lms24 May 3, 2023
4800458
test: Refactor playwright bundle generation (#8029)
mydea May 4, 2023
44eee4c
chore(angular): Upgrade `peerDependencies` to Angular 16 (#8035)
arjenbrandenburgh May 4, 2023
2395107
chore(angular): Clarify `@sentry/angular` and `@sentry/angular-ivy` v…
Lms24 May 4, 2023
43d9fa9
feat(sveltekit): Auto-wrap `load` functions with proxy module (#7994)
Lms24 May 4, 2023
9ea2bca
feat(node): Add ability to send cron monitor check ins (#8039)
AbhiPrasad May 4, 2023
ba9e198
meta(changelog): Update CHANGELOG for 7.51.0
mydea May 4, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
steps:
- name: PR is opened against master
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1
if: ${{ github.base_ref == 'master' && !startsWith(github.ref, 'refs/heads/prepare-release/') }}
if: ${{ github.base_ref == 'master' && !startsWith(github.head_ref, 'prepare-release/') }}
with:
message: |
⚠️ This PR is opened against **master**. You probably want to open it against **develop**.
Expand Down Expand Up @@ -770,7 +770,7 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v2
with:
version: 7
version: 8.3.1
- name: Set up Node
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
ref: ${{ env.HEAD_COMMIT }}
- uses: pnpm/action-setup@v2
with:
version: 7
version: 8.3.1
- name: Set up Node
uses: actions/setup-node@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.md
.nxcache
packages/browser-integration-tests/fixtures
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,70 @@

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

## 7.51.0

### Important Changes

- **feat(sveltekit): Auto-wrap `load` functions with proxy module (#7994)**

`@sentry/sveltekit` now auto-wraps `load` functions in

* `+(page|layout).(ts|js)` files (universal loads)
* `+(page|layout).server.(ts|js)` files (server-only loads)

This means that you don't have to manually add the `wrapLoadWithSentry` and `wrapServerLoadWithSentry` functions around your load functions. The SDK will not interfere with already wrapped `load` functions.

For more details, take a look at the [Readme](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md#configure-auto-instrumentation)

- **chore(angular): Upgrade `peerDependencies` to Angular 16 (#8035)**

We now officially support Angular 16 in `@sentry/angular-ivy`.
Note that `@sentry/angular` _does not_ support Angular 16.

- **feat(node): Add ability to send cron monitor check ins (#8039)**

This release adds [Sentry cron monitoring](https://docs.sentry.io/product/crons/) support to the Node SDK.

To monitor your cron jobs, send check-ins everytime you execute your cron jobs to Sentry. You can do this with the `captureCheckIn` method exported from the SDK. First you must send an `in_progress`, checkin, then you can send one with status `ok` or `error` based on what happened with your cron job.

```ts
const Sentry = require('@sentry/node');

// ...

Sentry.captureCheckIn({
// make sure this is the same slug as what you set up your
// Sentry cron monitor with.
monitorSlug: 'dailyEmail',
status: 'in_progress',
});

const startTime = timeInSeconds();

runTask();

Sentry.captureCheckIn({
monitorSlug: 'dailyEmail',
status: 'ok',
duration: timeInSeconds() - startTime,
});
```

### Additional Features and Fixes

- feat(browser): Export makeMultiplexedTransport from browser SDK (#8012)
- feat(node): Add `http.method` to node http spans (#7991)
- feat(tracing): add body size for fetch requests (#7935)
- feat(tracing): Use http.method for span data (#7990)
- fix(integrations): Handle windows paths with no prefix or backslash prefix in `RewriteFrames` (#7995)
- fix(node): Mark stack frames with url protocol as in-app frames (#8008)
- fix(remix): Export `Integration` type declaration as union type (#8016)
- fix(replay): Do not add replay_id to DSC while buffering (#8020)
- fix(tracing): Don't set method multiple times (#8014)
- fix(utils): Normalize `undefined` to `undefined` instead of `"[undefined]"` (#8017)

Work in this release contributed by @srubin and @arjenbrandenburgh. Thank you for your contributions!

## 7.50.0

### Important Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-ivy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

## Angular Version Compatibility

This SDK officially supports Angular 12-15 with Angular's new rendering engine, Ivy.
This SDK officially supports Angular 12 to 16 with Angular's new rendering engine, Ivy.

If you're using Angular 10, 11 or a newer Angular version with View Engine instead of Ivy, please use [`@sentry/angular`](https://github.com/getsentry/sentry-javascript/blob/develop/packages/angular/README.md).

Expand Down
6 changes: 3 additions & 3 deletions packages/angular-ivy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"access": "public"
},
"peerDependencies": {
"@angular/common": ">= 12.x <= 15.x",
"@angular/core": ">= 12.x <= 15.x",
"@angular/router": ">= 12.x <= 15.x",
"@angular/common": ">= 12.x <= 16.x",
"@angular/core": ">= 12.x <= 16.x",
"@angular/router": ">= 12.x <= 16.x",
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
Expand Down
6 changes: 5 additions & 1 deletion packages/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

## Angular Version Compatibility

The latest version of this SDK officially supports Angular 10-13. If you are using an older version of Angular and experience problems with the Angular SDK, we recommend downgrading the SDK to version 6.x.
**Important**: This package is not compatible with Angular 16 or newer. Please use [`@sentry/angular-ivy`](https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy) instead.

If you're using Angular 12 or newer, we recommend using `@sentry/angular-ivy` for native support with Angular's rendering engine Ivy.

This SDK stilll officially supports Angular 10-15. If you are using an older version of Angular and experience problems with the Angular SDK, we recommend downgrading the SDK to version 6.x.

## General

Expand Down
1 change: 1 addition & 0 deletions packages/browser-integration-tests/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
'loader-suites/**/subject.js',
'scripts/**',
'fixtures/**',
'tmp/**',
],
parserOptions: {
sourceType: 'module',
Expand Down
1 change: 1 addition & 0 deletions packages/browser-integration-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test-results
tmp
2 changes: 2 additions & 0 deletions packages/browser-integration-tests/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tmp
fixtures
3 changes: 1 addition & 2 deletions 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,17 @@
setTimeout(() => {
const cdnScript = document.createElement('script');
cdnScript.src = '/cdn.bundle.js';

cdnScript.addEventListener('load', () => {
window.Sentry.init({
dsn: 'https://[email protected]/1337',
replaysSessionSampleRate: 0.42,
});

setTimeout(() => {
window.doSomethingWrong();
}, 500);
});

document.head.appendChild(cdnScript);
}, 100);
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { expect } from '@playwright/test';
import fs from 'fs';
import path from 'path';

import { sentryTest, TEST_HOST } from '../../../../utils/fixtures';
import { LOADER_CONFIGS } from '../../../../utils/generatePlugin';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../utils/helpers';

const bundle = process.env.PW_BUNDLE || '';
const isLazy = LOADER_CONFIGS[bundle]?.lazy;

sentryTest('it does not download the SDK if the SDK was loaded in the meanwhile', async ({ getLocalTestUrl, page }) => {
// When the loader is eager, this does not work and makes no sense
if (isLazy !== true) {
sentryTest.skip();
}

let cdnLoadedCount = 0;
let sentryEventCount = 0;

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
sentryEventCount++;

return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

await page.route(`${TEST_HOST}/*.*`, route => {
const file = route.request().url().split('/').pop();

if (file === 'cdn.bundle.js') {
cdnLoadedCount++;
}

const filePath = path.resolve(__dirname, `./dist/${file}`);

return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
});

const req = waitForErrorRequest(page);

const url = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });

await page.goto(url);

const eventData = envelopeRequestParser(await req);

await waitForFunction(() => cdnLoadedCount === 2);

// Still loaded the CDN bundle twice
expect(cdnLoadedCount).toBe(2);

// But only sent to Sentry once
expect(sentryEventCount).toBe(1);

// Ensure loader does not overwrite init/config
const options = await page.evaluate(() => (window as any).Sentry.getCurrentHub().getClient()?.getOptions());
expect(options?.replaysSessionSampleRate).toBe(0.42);

expect(eventData.exception?.values?.length).toBe(1);
expect(eventData.exception?.values?.[0]?.value).toBe('window.doSomethingWrong is not a function');
});

async function waitForFunction(cb: () => boolean, timeout = 2000, increment = 100) {
while (timeout > 0 && !cb()) {
await new Promise(resolve => setTimeout(resolve, increment));
await waitForFunction(cb, timeout - increment, increment);
}
}
3 changes: 2 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"private": true,
"scripts": {
"clean": "rimraf -g suites/**/dist loader-suites/**/dist",
"clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp",
"install-browsers": "playwright install --with-deps",
"lint": "run-s lint:prettier lint:eslint",
"lint:eslint": "eslint . --format stylish",
Expand Down Expand Up @@ -58,6 +58,7 @@
},
"devDependencies": {
"@types/glob": "8.0.0",
"@types/node": "^14.6.4",
"glob": "8.0.3"
},
"volta": {
Expand Down
3 changes: 3 additions & 0 deletions packages/browser-integration-tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ const config: PlaywrightTestConfig = {
// Use 3 workers on CI, else use defaults (based on available CPU cores)
// Note that 3 is a random number selected to work well with our CI setup
workers: process.env.CI ? 3 : undefined,

globalSetup: require.resolve('./playwright.setup.ts'),
};

export default config;
5 changes: 5 additions & 0 deletions packages/browser-integration-tests/playwright.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import setupStaticAssets from './utils/staticAssets';

export default function globalSetup(): Promise<void> {
return setupStaticAssets();
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ sentryTest('should record multiple contexts', async ({ getLocalTestPath, page })
baz: { qux: 'quux' },
},
context_2: { 1: 'foo', bar: false },
context_4: '[undefined]',
context_5: '[NaN]',
context_6: 3.141592653589793,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ sentryTest(

// 2 errors, 1 flush
await reqErrorPromise;
expect(callsToSentry).toEqual(3);
expect(callsToSentry).toBeGreaterThanOrEqual(3);

await page.click('#log');
await page.click('#go-background');

// Switches to session mode and then goes to background
const req1 = await reqPromise1;
const req2 = await reqPromise2;
expect(callsToSentry).toEqual(5);
expect(callsToSentry).toBeGreaterThanOrEqual(5);

const event0 = getReplayEvent(req0);
const content0 = getReplayRecordingContent(req0);
Expand Down
3 changes: 2 additions & 1 deletion packages/browser-integration-tests/suites/replay/dsc/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Sentry.init({
integrations: [new Integrations.BrowserTracing({ tracingOrigins: [/.*/] }), window.Replay],
environment: 'production',
tracesSampleRate: 1,
// Needs manual start!
replaysSessionSampleRate: 0.0,
replaysOnErrorSampleRate: 1.0,
replaysOnErrorSampleRate: 0.0,
});
Loading