Skip to content

meta(changelog): Update changelog for 7.69.0 #9009

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 36 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8e99ba9
ref(core): Avoid unnecessary breadcrumbs array mutations (#8957)
mydea Sep 6, 2023
3076e09
fix(nextjs): Request for no HSTS in tunnel route endpoint (#8936)
lforst Sep 6, 2023
66a925e
Merge pull request #8959 from getsentry/master
github-actions[bot] Sep 6, 2023
d3fe473
feat(nextjs): Remove `EdgeClient` and use `ServerRuntimeClient` (#8932)
timfish Sep 6, 2023
dad475c
fix(node-experimental): Use Sentry logger as Otel logger (#8960)
mydea Sep 7, 2023
fbe1b78
fix: uuidv4 fix for cloudflare (#8968)
HazAT Sep 7, 2023
4c17f6e
ref(core): Introduce protected `_getBreadcrumbs()` on scope (#8961)
mydea Sep 7, 2023
843c072
fix(remix): Add `glob` to Remix SDK dependencies. (#8963)
onurtemizkan Sep 7, 2023
eafe791
chore(e2e): Use Node 18 for E2E tests. (#8964)
onurtemizkan Sep 7, 2023
cf75ffe
feat(core): Update span performance API names (#8971)
AbhiPrasad Sep 7, 2023
4278a71
feat(remix): Accept `org`, `project` and `url` as args to upload scri…
onurtemizkan Sep 8, 2023
f63b33b
ref: Remove all usages of ts-ignore (#8974)
AbhiPrasad Sep 8, 2023
b190015
fix(core): Always use event message and exception values for `ignoreE…
lforst Sep 8, 2023
6f97b5f
ref: Cleanup lint warnings (#8972)
AbhiPrasad Sep 8, 2023
e7417e0
chore: Update migration docs to indicate sentry-migr8 is experimental…
AbhiPrasad Sep 8, 2023
d3c3462
feat(eslint): Enforce that ts-expect-error is used (#8987)
AbhiPrasad Sep 11, 2023
2ab1f50
fix(overhead-metrics): Remove unneeded @ts-expect-error (#8990)
AbhiPrasad Sep 11, 2023
434507d
fix(node-experimental): Ensure we only create HTTP spans when outgoin…
mydea Sep 11, 2023
30c4540
fix(replay): Fully stop & restart session when it expires (#8834)
mydea Sep 11, 2023
a2ba075
fix(replay): Ensure `handleRecordingEmit` aborts when event is not ad…
mydea Sep 11, 2023
f63036b
build(lint): Remove unneeded `@ts-expect` comments (#8995)
mydea Sep 11, 2023
9e39717
fix(node-experimental): Ignore outgoing Sentry requests (#8994)
mydea Sep 11, 2023
ce84fb3
feat(integration): Ensure `LinkedErrors` integration runs before all …
mydea Sep 11, 2023
595e4e2
feat(redux): Add 'attachReduxState' option (#8953)
malay44 Sep 11, 2023
3db988f
feat(core): Introduce startSpanManual (#8913)
AbhiPrasad Sep 11, 2023
5a42bd9
fix(nextjs): Add new potential location for Next.js request AsyncLoca…
lforst Sep 12, 2023
d16f819
fix(node-experimental): Require parent span for `pg` spans (#8993)
mydea Sep 12, 2023
47d0c89
fix(react): Switch to props in `useRoutes` (#8998)
onurtemizkan Sep 12, 2023
868a3cd
feat(core): Export `BeforeFinishCallback` type (#8999)
krystofwoldrich Sep 12, 2023
a7f5911
ref: Avoid unnecessary `hub.getScope()` checks (#9008)
mydea Sep 12, 2023
475c295
fix(node-otel): Refactor OTEL span reference cleanup (#9000)
mydea Sep 12, 2023
0e23d4d
fix(node-experimental): Ignore OPTIONS & HEAD requests (#9001)
mydea Sep 12, 2023
cfc2333
chore(ts): Add TS3.8 compile test (#8955)
krystofwoldrich Sep 12, 2023
789e849
feat(node-experimental): Keep breadcrumbs on transaction (#8967)
mydea Sep 12, 2023
90ee2a4
fix(utils): Prevent iterating over VueViewModel (#8981)
Duncanxyz Sep 13, 2023
1768ba0
meta(changelog): Update changelog for 7.69.0
mydea Sep 13, 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
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,11 @@ jobs:
'create-remix-app',
'nextjs-app-dir',
'react-create-hash-router',
'react-router-6-use-routes',
'standard-frontend-react',
'standard-frontend-react-tracing-import',
'sveltekit',
'generic-ts3.8',
]
build-command:
- false
Expand All @@ -818,7 +820,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
node-version-file: 'packages/e2e-tests/package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
Expand All @@ -833,7 +835,7 @@ jobs:
- name: Get node version
id: versions
run: |
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
echo "echo node=$(jq -r '.volta.node' packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT

- name: Validate Verdaccio
run: yarn test:validate
Expand Down
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,93 @@

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

## 7.69.0

### Important Changes

- **New Performance APIs**
- feat: Update span performance API names (#8971)
- feat(core): Introduce startSpanManual (#8913)

This release introduces a new set of top level APIs for the Performance Monitoring SDKs. These aim to simplify creating spans and reduce the boilerplate needed for performance instrumentation. The three new methods introduced are `Sentry.startSpan`, `Sentry.startInactiveSpan`, and `Sentry.startSpanManual`. These methods are available in the browser and node SDKs.

`Sentry.startSpan` wraps a callback in a span. The span is automatically finished when the callback returns. This is the recommended way to create spans.

```js
// Start a span that tracks the duration of expensiveFunction
const result = Sentry.startSpan({ name: 'important function' }, () => {
return expensiveFunction();
});

// You can also mutate the span wrapping the callback to set data or status
Sentry.startSpan({ name: 'important function' }, (span) => {
// span is undefined if performance monitoring is turned off or if
// the span was not sampled. This is done to reduce overhead.
span?.setData('version', '1.0.0');
return expensiveFunction();
});
```

If you don't want the span to finish when the callback returns, use `Sentry.startSpanManual` to control when the span is finished. This is useful for event emitters or similar.

```js
// Start a span that tracks the duration of middleware
function middleware(_req, res, next) {
return Sentry.startSpanManual({ name: 'middleware' }, (span, finish) => {
res.once('finish', () => {
span?.setHttpStatus(res.status);
finish();
});
return next();
});
}
```

`Sentry.startSpan` and `Sentry.startSpanManual` create a span and make it active for the duration of the callback. Any spans created while this active span is running will be added as a child span to it. If you want to create a span without making it active, use `Sentry.startInactiveSpan`. This is useful for creating parallel spans that are not related to each other.

```js
const span1 = Sentry.startInactiveSpan({ name: 'span1' });

someWork();

const span2 = Sentry.startInactiveSpan({ name: 'span2' });

moreWork();

const span3 = Sentry.startInactiveSpan({ name: 'span3' });

evenMoreWork();

span1?.finish();
span2?.finish();
span3?.finish();
```

### Other Changes

- feat(core): Export `BeforeFinishCallback` type (#8999)
- build(eslint): Enforce that ts-expect-error is used (#8987)
- feat(integration): Ensure `LinkedErrors` integration runs before all event processors (#8956)
- feat(node-experimental): Keep breadcrumbs on transaction (#8967)
- feat(redux): Add 'attachReduxState' option (#8953)
- feat(remix): Accept `org`, `project` and `url` as args to upload script (#8985)
- fix(utils): Prevent iterating over VueViewModel (#8981)
- fix(utils): uuidv4 fix for cloudflare (#8968)
- fix(core): Always use event message and exception values for `ignoreErrors` (#8986)
- fix(nextjs): Add new potential location for Next.js request AsyncLocalStorage (#9006)
- fix(node-experimental): Ensure we only create HTTP spans when outgoing (#8966)
- fix(node-experimental): Ignore OPTIONS & HEAD requests (#9001)
- fix(node-experimental): Ignore outgoing Sentry requests (#8994)
- fix(node-experimental): Require parent span for `pg` spans (#8993)
- fix(node-experimental): Use Sentry logger as Otel logger (#8960)
- fix(node-otel): Refactor OTEL span reference cleanup (#9000)
- fix(react): Switch to props in `useRoutes` (#8998)
- fix(remix): Add `glob` to Remix SDK dependencies. (#8963)
- fix(replay): Ensure `handleRecordingEmit` aborts when event is not added (#8938)
- fix(replay): Fully stop & restart session when it expires (#8834)

Work in this release contributed by @Duncanxyz and @malay44. Thank you for your contributions!

## 7.68.0

- feat(browser): Add `BroadcastChannel` and `SharedWorker` to TryCatch EventTargets (#8943)
Expand Down
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deprecations in 7.x

You can use [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update your SDK usage and fix most deprecations:
You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update your SDK usage and fix most deprecations. This requires Node 18+.

```bash
npx @sentry/migr8@latest
Expand Down
4 changes: 1 addition & 3 deletions packages/angular/src/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ export function getActiveTransaction(): Transaction | undefined {

if (currentHub) {
const scope = currentHub.getScope();
if (scope) {
return scope.getTransaction();
}
return scope.getTransaction();
}

return undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ describe('SentryErrorHandler', () => {
}),
};

// @ts-ignore this is a minmal hub, we're missing a few props but that's ok
// @ts-expect-error this is a minmal hub, we're missing a few props but that's ok
jest.spyOn(SentryBrowser, 'getCurrentHub').mockImplementationOnce(() => {
return { getClient: () => client };
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ sentryTest(
expect(
await page.evaluate(() => {
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
// @ts-ignore private
// @ts-expect-error private
const replay = replayIntegration._replay;
replayIntegration.startBuffering();
return replay.isEnabled();
Expand Down Expand Up @@ -210,7 +210,7 @@ sentryTest(
expect(
await page.evaluate(() => {
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
// @ts-ignore private
// @ts-expect-error private
const replay = replayIntegration._replay;
replayIntegration.startBuffering();
return replay.isEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sentryTest('captures text request body', async ({ getLocalTestPath, page, browse
method: 'POST',
body: 'input body',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -120,7 +120,7 @@ sentryTest('captures JSON request body', async ({ getLocalTestPath, page, browse
method: 'POST',
body: '{"foo":"bar"}',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -203,7 +203,7 @@ sentryTest('captures non-text request body', async ({ getLocalTestPath, page, br
method: 'POST',
body: body,
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -282,7 +282,7 @@ sentryTest('captures text request body when matching relative URL', async ({ get
method: 'POST',
body: 'input body',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -359,7 +359,7 @@ sentryTest('does not capture request body when URL does not match', async ({ get
method: 'POST',
body: 'input body',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sentryTest('handles empty/missing request headers', async ({ getLocalTestPath, p
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -117,7 +117,7 @@ sentryTest('captures request headers as POJO', async ({ getLocalTestPath, page,
'X-Test-Header': 'test-value',
},
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -201,7 +201,7 @@ sentryTest('captures request headers on Request', async ({ getLocalTestPath, pag
});
/* eslint-disable */
fetch(request).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -284,7 +284,7 @@ sentryTest('captures request headers as Headers instance', async ({ getLocalTest
method: 'POST',
headers,
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -367,7 +367,7 @@ sentryTest('does not captures request headers if URL does not match', async ({ g
'X-Test-Header': 'test-value',
},
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sentryTest('captures request body size when body is sent', async ({ getLocalTest
method: 'POST',
body: '{"foo":"bar"}',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -125,7 +125,7 @@ sentryTest('captures request size from non-text request body', async ({ getLocal
method: 'POST',
body: blob,
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sentryTest('captures text response body', async ({ getLocalTestPath, page, brows
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -122,7 +122,7 @@ sentryTest('captures JSON response body', async ({ getLocalTestPath, page, brows
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -203,7 +203,7 @@ sentryTest('captures non-text response body', async ({ getLocalTestPath, page, b
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -282,7 +282,7 @@ sentryTest('does not capture response body when URL does not match', async ({ ge
fetch('http://localhost:7654/bar', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sentryTest('handles empty headers', async ({ getLocalTestPath, page, browserName
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -113,7 +113,7 @@ sentryTest('captures response headers', async ({ getLocalTestPath, page }) => {
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -194,7 +194,7 @@ sentryTest('does not capture response headers if URL does not match', async ({ g
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/bar').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sentryTest('captures response size from Content-Length header if available', asy
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -131,7 +131,7 @@ sentryTest('captures response size without Content-Length header', async ({ getL
await page.evaluate(() => {
/* eslint-disable */
fetch('http://localhost:7654/foo').then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down Expand Up @@ -218,7 +218,7 @@ sentryTest('captures response size from non-text response body', async ({ getLoc
fetch('http://localhost:7654/foo', {
method: 'POST',
}).then(() => {
// @ts-ignore Sentry is a global
// @ts-expect-error Sentry is a global
Sentry.captureException('test error');
});
/* eslint-enable */
Expand Down
Loading