Skip to content

Commit 53a08bf

Browse files
author
Luca Forstner
authored
Merge pull request #9915 from getsentry/prepare-release/7.89.0
meta(changelog): Update changelog for 7.89.0
2 parents f1a677f + 9f173e1 commit 53a08bf

File tree

254 files changed

+8606
-1661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+8606
-1661
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,13 +864,16 @@ jobs:
864864
'create-remix-app-v2',
865865
'debug-id-sourcemaps',
866866
'nextjs-app-dir',
867+
'nextjs-14',
867868
'react-create-hash-router',
868869
'react-router-6-use-routes',
869870
'standard-frontend-react',
870871
'standard-frontend-react-tracing-import',
871872
'sveltekit',
873+
'sveltekit-2',
872874
'generic-ts3.8',
873875
'node-experimental-fastify-app',
876+
'node-hapi-app',
874877
]
875878
build-command:
876879
- false

.github/workflows/canary.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ jobs:
7373
- test-application: 'nextjs-app-dir'
7474
build-command: 'test:build-latest'
7575
label: 'nextjs-app-dir (latest)'
76+
- test-application: 'nextjs-14'
77+
build-command: 'test:build-canary'
78+
label: 'nextjs-14 (canary)'
79+
- test-application: 'nextjs-14'
80+
build-command: 'test:build-latest'
81+
label: 'nextjs-14 (latest)'
7682
- test-application: 'react-create-hash-router'
7783
build-command: 'test:build-canary'
7884
label: 'react-create-hash-router (canary)'

CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,74 @@
44

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

7+
## 7.89.0
8+
9+
### Important Changes
10+
11+
#### Deprecations
12+
13+
- **feat(core): Deprecate `configureScope` (#9887)**
14+
- **feat(core): Deprecate `pushScope` & `popScope` (#9890)**
15+
16+
This release deprecates `configureScope`, `pushScope`, and `popScope`, which will be removed in the upcoming v8 major release.
17+
18+
#### Hapi Integration
19+
20+
- **feat(node): Add Hapi Integration (#9539)**
21+
22+
This release adds an integration for Hapi. It can be used as follows:
23+
24+
```ts
25+
const Sentry = require('@sentry/node');
26+
const Hapi = require('@hapi/hapi');
27+
28+
const init = async () => {
29+
const server = Hapi.server({
30+
// your server configuration ...
31+
});
32+
33+
Sentry.init({
34+
dsn: '__DSN__',
35+
tracesSampleRate: 1.0,
36+
integrations: [
37+
new Sentry.Integrations.Hapi({ server }),
38+
],
39+
});
40+
41+
server.route({
42+
// your route configuration ...
43+
});
44+
45+
await server.start();
46+
};
47+
```
48+
49+
#### SvelteKit 2.0
50+
51+
- **chore(sveltekit): Add SvelteKit 2.0 to peer dependencies (#9861)**
52+
53+
This release adds support for SvelteKit 2.0 in the `@sentry/sveltekit` package. If you're upgrading from SvelteKit 1.x to 2.x and already use the Sentry SvelteKit SDK, no changes apart from upgrading to this (or a newer) version are necessary.
54+
55+
### Other Changes
56+
57+
- feat(core): Add type & utility for function-based integrations (#9818)
58+
- feat(core): Update `withScope` to return callback return value (#9866)
59+
- feat(deno): Support `Deno.CronSchedule` for cron jobs (#9880)
60+
- feat(nextjs): Auto instrument generation functions (#9781)
61+
- feat(nextjs): Connect server component transactions if there is no incoming trace (#9845)
62+
- feat(node-experimental): Update to new Scope APIs (#9799)
63+
- feat(replay): Add `canvas.type` setting (#9877)
64+
- fix(nextjs): Export `createReduxEnhancer` (#9854)
65+
- fix(remix): Do not capture thrown redirect responses. (#9909)
66+
- fix(sveltekit): Add conditional exports (#9872)
67+
- fix(sveltekit): Avoid capturing 404 errors on client side (#9902)
68+
- fix(utils): Do not use `Event` type in worldwide (#9864)
69+
- fix(utils): Support crypto.getRandomValues in old Chromium versions (#9251)
70+
- fix(utils): Update `eventFromUnknownInput` to avoid scope pollution & `getCurrentHub` (#9868)
71+
- ref: Use `addBreadcrumb` directly & allow to pass hint (#9867)
72+
73+
Work in this release contributed by @adam187, and @jghinestrosa. Thank you for your contributions!
74+
775
## 7.88.0
876

977
### Important Changes

MIGRATION.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ npx @sentry/migr8@latest
88

99
This will let you select which updates to run, and automatically update your code. Make sure to still review all code changes!
1010

11+
## Deprecate `pushScope` & `popScope` in favor of `withScope`
12+
13+
Instead of manually pushing/popping a scope, you should use `Sentry.withScope(callback: (scope: Scope))` instead.
14+
15+
## Deprecate `configureScope` in favor of using `getCurrentScope()`
16+
17+
Instead of updating the scope in a callback via `configureScope()`, you should access it via `getCurrentScope()` and configure it directly:
18+
19+
```js
20+
Sentry.getCurrentScope().setTag('xx', 'yy');
21+
```
22+
1123
## Deprecate `addGlobalEventProcessor` in favor of `addEventProcessor`
1224

1325
Instead of using `addGlobalEventProcessor`, you should use `addEventProcessor` which does not add the event processor globally, but to the current client.

codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ codecov:
33
notify:
44
require_ci_to_pass: no
55

6+
ai_pr_review:
7+
enabled: true
8+
method: "label"
9+
label_name: "ci-codecov-ai-review"
10+
611
coverage:
712
precision: 2
813
round: down

packages/angular/src/tracing.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ActivatedRouteSnapshot, Event, RouterState } from '@angular/router
77
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
88
import { NavigationCancel, NavigationError, Router } from '@angular/router';
99
import { NavigationEnd, NavigationStart, ResolveEnd } from '@angular/router';
10-
import { WINDOW, getCurrentHub } from '@sentry/browser';
10+
import { WINDOW, getCurrentScope } from '@sentry/browser';
1111
import type { Span, Transaction, TransactionContext } from '@sentry/types';
1212
import { logger, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/utils';
1313
import type { Observable } from 'rxjs';
@@ -50,14 +50,7 @@ export const instrumentAngularRouting = routingInstrumentation;
5050
* Grabs active transaction off scope
5151
*/
5252
export function getActiveTransaction(): Transaction | undefined {
53-
const currentHub = getCurrentHub();
54-
55-
if (currentHub) {
56-
const scope = currentHub.getScope();
57-
return scope.getTransaction();
58-
}
59-
60-
return undefined;
53+
return getCurrentScope().getTransaction();
6154
}
6255

6356
/**

packages/angular/test/tracing.test.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ jest.mock('@sentry/browser', () => {
2121
const original = jest.requireActual('@sentry/browser');
2222
return {
2323
...original,
24-
getCurrentHub: () => {
24+
getCurrentScope() {
2525
return {
26-
getScope: () => {
27-
return {
28-
getTransaction: () => {
29-
return transaction;
30-
},
31-
};
26+
getTransaction: () => {
27+
return transaction;
3228
},
33-
} as unknown as Hub;
29+
};
3430
},
3531
};
3632
});

packages/astro/src/client/sdk.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { BrowserOptions } from '@sentry/browser';
22
import { BrowserTracing, init as initBrowserSdk } from '@sentry/browser';
3-
import { configureScope, hasTracingEnabled } from '@sentry/core';
3+
import { getCurrentScope, hasTracingEnabled } from '@sentry/core';
44
import { addOrUpdateIntegration } from '@sentry/utils';
55

66
import { applySdkMetadata } from '../common/metadata';
@@ -20,9 +20,7 @@ export function init(options: BrowserOptions): void {
2020

2121
initBrowserSdk(options);
2222

23-
configureScope(scope => {
24-
scope.setTag('runtime', 'browser');
25-
});
23+
getCurrentScope().setTag('runtime', 'browser');
2624
}
2725

2826
function addClientIntegrations(options: BrowserOptions): void {

packages/astro/src/index.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export {
1717
captureMessage,
1818
captureCheckIn,
1919
withMonitor,
20+
// eslint-disable-next-line deprecation/deprecation
2021
configureScope,
2122
createTransport,
2223
// eslint-disable-next-line deprecation/deprecation

packages/astro/src/server/meta.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getDynamicSamplingContextFromClient } from '@sentry/core';
2-
import type { Hub, Span } from '@sentry/types';
2+
import type { Client, Scope, Span } from '@sentry/types';
33
import {
44
TRACEPARENT_REGEXP,
55
dynamicSamplingContextToSentryBaggageHeader,
@@ -22,9 +22,11 @@ import {
2222
*
2323
* @returns an object with the two serialized <meta> tags
2424
*/
25-
export function getTracingMetaTags(span: Span | undefined, hub: Hub): { sentryTrace: string; baggage?: string } {
26-
const scope = hub.getScope();
27-
const client = hub.getClient();
25+
export function getTracingMetaTags(
26+
span: Span | undefined,
27+
scope: Scope,
28+
client: Client | undefined,
29+
): { sentryTrace: string; baggage?: string } {
2830
const { dsc, sampled, traceId } = scope.getPropagationContext();
2931
const transaction = span?.transaction;
3032

0 commit comments

Comments
 (0)