Skip to content

Commit b135be6

Browse files
authored
Merge pull request #12062 from getsentry/prepare-release/8.1.0
meta: Update CHANGELOG for 8.1.0
2 parents 03a9f22 + fddbe2a commit b135be6

File tree

140 files changed

+1016
-6889
lines changed

Some content is hidden

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

140 files changed

+1016
-6889
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ jobs:
10031003
'create-remix-app-express',
10041004
'create-remix-app-express-vite-dev',
10051005
'debug-id-sourcemaps',
1006-
# 'esm-loader-node-express-app', # This is currently broken for upstream reasons. See https://github.com/getsentry/sentry-javascript/pull/11338#issuecomment-2025450675
1006+
'node-express-esm-loader',
10071007
'nextjs-app-dir',
10081008
'nextjs-14',
10091009
'react-create-hash-router',

.github/workflows/flaky-test-detector.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,17 @@ jobs:
7979
browser_integration: dev-packages/browser-integration-tests/suites/**/test.ts
8080
8181
- name: Detect flaky tests
82+
id: test
8283
run: yarn test:detect-flaky
8384
working-directory: dev-packages/browser-integration-tests
8485
env:
8586
CHANGED_TEST_PATHS: ${{ steps.changed.outputs.browser_integration_files }}
8687
TEST_RUN_COUNT: 'AUTO'
88+
89+
- name: Artifacts upload
90+
uses: actions/upload-artifact@v4
91+
if: failure() && steps.test.outcome == 'failure'
92+
with:
93+
name: playwright-test-results
94+
path: test-results
95+
retention-days: 5

.size-limit.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,33 @@ module.exports = [
211211
gzip: true,
212212
limit: '180 KB',
213213
},
214+
// AWS SDK (ESM)
215+
{
216+
name: '@sentry/aws-serverless',
217+
path: 'packages/aws-serverless/build/npm/esm/index.js',
218+
import: createImport('init'),
219+
ignore: [
220+
'node:http',
221+
'node:https',
222+
'node:diagnostics_channel',
223+
'async_hooks',
224+
'child_process',
225+
'perf_hooks',
226+
'fs',
227+
'os',
228+
'path',
229+
'inspector',
230+
'worker_threads',
231+
'http',
232+
'stream',
233+
'zlib',
234+
'net',
235+
'tls',
236+
'module',
237+
],
238+
gzip: true,
239+
limit: '140 KB',
240+
},
214241
];
215242

216243
function createImport(...args) {

CHANGELOG.md

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

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

7+
## 8.1.0
8+
9+
This release mainly fixes a couple of bugs from the initial [8.0.0 release](#800). In addition to the changes below, we
10+
updated some initially missed points in our migration guides and documentation.
11+
12+
- feat(aws-serverless): Fix tree-shaking for aws-serverless package (#12017)
13+
- feat(node): Bump opentelemetry instrumentation to latest version (#12028)
14+
- feat(scope): Bring back `lastEventId` on isolation scope (#11951) (#12022)
15+
- fix(aws-serverless): Export `awslambda-auto`
16+
- fix(node): Do not warn for missing instrumentation if SDK is disabled (#12041)
17+
- fix(react): Set dependency-injected functions as early as possible (#12019)
18+
- fix(react): Warn and fall back gracefully if dependency injected functions are not available (#12026)
19+
- ref(core): Streamline `parseSampleRate` utility function (#12024)
20+
- ref(feedback): Make `eventId` optional and use `lastEventId` in report dialog (#12029)
21+
722
## 8.0.0
823

924
The Sentry JS SDK team is proud to announce the release of version `8.0.0` of Sentry's JavaScript SDKs - it's been a

MIGRATION.md

Lines changed: 11 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ dependencies on OpenTelemetry. Below we will outline the steps you need to take
1515
Before updating to `8.x` of the SDK, we recommend upgrading to the latest version of `7.x`. You can then follow
1616
[these steps](./MIGRATION.md#deprecations-in-7x) remove deprecated methods in `7.x` before upgrading to `8.x`.
1717

18-
The v8 version of the JavaScript SDK requires a self-hosted version of Sentry TBD or higher (Will be chosen once first
19-
stable release of `8.x` comes out).
18+
The v8 version of the JavaScript SDK requires a self-hosted version of Sentry 24.4.2 (for user feedback screenshots) or
19+
higher. Lower versions may continue to work, but may not support all features (e.g. the new user feedback APIs).
2020

2121
## 1. Version Support changes:
2222

@@ -375,7 +375,7 @@ To make sure these integrations work properly you'll have to change how you
375375
### General
376376

377377
Removed top-level exports: `tracingOrigins`, `MetricsAggregator`, `metricsAggregatorIntegration`, `Severity`,
378-
`Sentry.configureScope`, `Span`, `spanStatusfromHttpCode`, `makeMain`, `lastEventId`, `pushScope`, `popScope`,
378+
`Sentry.configureScope`, `Span`, `spanStatusfromHttpCode`, `makeMain`, `pushScope`, `popScope`,
379379
`addGlobalEventProcessor`, `timestampWithMs`, `addExtensionMethods`, `addGlobalEventProcessor`, `getActiveTransaction`
380380

381381
Removed `@sentry/utils` exports: `timestampWithMs`, `addOrUpdateIntegration`, `tracingContextFromHeaders`, `walk`
@@ -389,7 +389,6 @@ Removed `@sentry/utils` exports: `timestampWithMs`, `addOrUpdateIntegration`, `t
389389
- [Removal of `Span` class export from SDK packages](./MIGRATION.md#removal-of-span-class-export-from-sdk-packages)
390390
- [Removal of `spanStatusfromHttpCode` in favour of `getSpanStatusFromHttpCode`](./MIGRATION.md#removal-of-spanstatusfromhttpcode-in-favour-of-getspanstatusfromhttpcode)
391391
- [Removal of `addGlobalEventProcessor` in favour of `addEventProcessor`](./MIGRATION.md#removal-of-addglobaleventprocessor-in-favour-of-addeventprocessor)
392-
- [Removal of `lastEventId()` method](./MIGRATION.md#deprecate-lasteventid)
393392
- [Remove `void` from transport return types](./MIGRATION.md#remove-void-from-transport-return-types)
394393
- [Remove `addGlobalEventProcessor` in favor of `addEventProcessor`](./MIGRATION.md#remove-addglobaleventprocessor-in-favor-of-addeventprocessor)
395394

@@ -568,10 +567,6 @@ Sentry.getGlobalScope().addEventProcessor(event => {
568567
});
569568
```
570569

571-
#### Removal of `lastEventId()` method
572-
573-
The `lastEventId` function has been removed. See [below](./MIGRATION.md#deprecate-lasteventid) for more details.
574-
575570
#### Removal of `void` from transport return types
576571

577572
The `send` method on the `Transport` interface now always requires a `TransportMakeRequestResponse` to be returned in
@@ -616,6 +611,13 @@ addEventProcessor(event => {
616611
The Sentry tRPC middleware got moved from `Sentry.Handlers.trpcMiddleware()` to `Sentry.trpcMiddleware()`. Functionally
617612
they are the same:
618613

614+
#### Removal of `Sentry.Handlers.requestHandler()`, `Sentry.Handlers.tracingHandler()` and `Sentry.Handlers.errorHandler()`
615+
616+
For Express and Connect you previously had to use `Sentry.Handlers.requestHandler()`,
617+
`Sentry.Handlers.tracingHandler()`, and `Sentry.Handlers.errorHandler()` to add Sentry instrumentation to your app. In
618+
8.x, you only need to use the framework specific error handler (e.g `Sentry.setupExpressErrorHandler(app)`), you can
619+
remove all other handlers.
620+
619621
```js
620622
// v7
621623
import * as Sentry from '@sentry/node';
@@ -1569,7 +1571,7 @@ If you are using the `Hub` right now, see the following table on how to migrate
15691571
| captureException() | `Sentry.captureException()` |
15701572
| captureMessage() | `Sentry.captureMessage()` |
15711573
| captureEvent() | `Sentry.captureEvent()` |
1572-
| lastEventId() | REMOVED - Use event processors or beforeSend instead |
1574+
| lastEventId() | `Sentry.lastEventId()` |
15731575
| addBreadcrumb() | `Sentry.addBreadcrumb()` |
15741576
| setUser() | `Sentry.setUser()` |
15751577
| setTags() | `Sentry.setTags()` |
@@ -1690,35 +1692,6 @@ app.get('/your-route', req => {
16901692
});
16911693
```
16921694

1693-
## Deprecate `Sentry.lastEventId()` and `hub.lastEventId()`
1694-
1695-
`Sentry.lastEventId()` sometimes causes race conditions, so we are deprecating it in favour of the `beforeSend`
1696-
callback.
1697-
1698-
```js
1699-
// Before
1700-
Sentry.init({
1701-
beforeSend(event, hint) {
1702-
const lastCapturedEventId = Sentry.lastEventId();
1703-
1704-
// Do something with `lastCapturedEventId` here
1705-
1706-
return event;
1707-
},
1708-
});
1709-
1710-
// After
1711-
Sentry.init({
1712-
beforeSend(event, hint) {
1713-
const lastCapturedEventId = event.event_id;
1714-
1715-
// Do something with `lastCapturedEventId` here
1716-
1717-
return event;
1718-
},
1719-
});
1720-
```
1721-
17221695
## Deprecated fields on `Span` and `Transaction`
17231696

17241697
In v8, the Span class is heavily reworked. The following properties & methods are thus deprecated:
@@ -1786,25 +1759,6 @@ Instead, import this directly from `@sentry/utils`.
17861759
Generally, in most cases you should probably use `continueTrace` instead, which abstracts this away from you and handles
17871760
scope propagation for you.
17881761

1789-
## Deprecate `lastEventId()`
1790-
1791-
Instead, if you need the ID of a recently captured event, we recommend using `beforeSend` instead:
1792-
1793-
```ts
1794-
import * as Sentry from '@sentry/browser';
1795-
1796-
Sentry.init({
1797-
dsn: '__DSN__',
1798-
beforeSend(event, hint) {
1799-
const lastCapturedEventId = event.event_id;
1800-
1801-
// Do something with `lastCapturedEventId` here
1802-
1803-
return event;
1804-
},
1805-
});
1806-
```
1807-
18081762
## Deprecate `timestampWithMs` export - #7878
18091763

18101764
The `timestampWithMs` util is deprecated in favor of using `timestampInSeconds`.

0 commit comments

Comments
 (0)