Skip to content

Commit

Permalink
Merge pull request #12062 from getsentry/prepare-release/8.1.0
Browse files Browse the repository at this point in the history
meta: Update CHANGELOG for 8.1.0
  • Loading branch information
Lms24 committed May 16, 2024
2 parents 03a9f22 + fddbe2a commit b135be6
Show file tree
Hide file tree
Showing 140 changed files with 1,016 additions and 6,889 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ jobs:
'create-remix-app-express',
'create-remix-app-express-vite-dev',
'debug-id-sourcemaps',
# 'esm-loader-node-express-app', # This is currently broken for upstream reasons. See https://github.com/getsentry/sentry-javascript/pull/11338#issuecomment-2025450675
'node-express-esm-loader',
'nextjs-app-dir',
'nextjs-14',
'react-create-hash-router',
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/flaky-test-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,17 @@ jobs:
browser_integration: dev-packages/browser-integration-tests/suites/**/test.ts
- name: Detect flaky tests
id: test
run: yarn test:detect-flaky
working-directory: dev-packages/browser-integration-tests
env:
CHANGED_TEST_PATHS: ${{ steps.changed.outputs.browser_integration_files }}
TEST_RUN_COUNT: 'AUTO'

- name: Artifacts upload
uses: actions/upload-artifact@v4
if: failure() && steps.test.outcome == 'failure'
with:
name: playwright-test-results
path: test-results
retention-days: 5
27 changes: 27 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,33 @@ module.exports = [
gzip: true,
limit: '180 KB',
},
// AWS SDK (ESM)
{
name: '@sentry/aws-serverless',
path: 'packages/aws-serverless/build/npm/esm/index.js',
import: createImport('init'),
ignore: [
'node:http',
'node:https',
'node:diagnostics_channel',
'async_hooks',
'child_process',
'perf_hooks',
'fs',
'os',
'path',
'inspector',
'worker_threads',
'http',
'stream',
'zlib',
'net',
'tls',
'module',
],
gzip: true,
limit: '140 KB',
},
];

function createImport(...args) {
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@

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

## 8.1.0

This release mainly fixes a couple of bugs from the initial [8.0.0 release](#800). In addition to the changes below, we
updated some initially missed points in our migration guides and documentation.

- feat(aws-serverless): Fix tree-shaking for aws-serverless package (#12017)
- feat(node): Bump opentelemetry instrumentation to latest version (#12028)
- feat(scope): Bring back `lastEventId` on isolation scope (#11951) (#12022)
- fix(aws-serverless): Export `awslambda-auto`
- fix(node): Do not warn for missing instrumentation if SDK is disabled (#12041)
- fix(react): Set dependency-injected functions as early as possible (#12019)
- fix(react): Warn and fall back gracefully if dependency injected functions are not available (#12026)
- ref(core): Streamline `parseSampleRate` utility function (#12024)
- ref(feedback): Make `eventId` optional and use `lastEventId` in report dialog (#12029)

## 8.0.0

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
Expand Down
68 changes: 11 additions & 57 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ dependencies on OpenTelemetry. Below we will outline the steps you need to take
Before updating to `8.x` of the SDK, we recommend upgrading to the latest version of `7.x`. You can then follow
[these steps](./MIGRATION.md#deprecations-in-7x) remove deprecated methods in `7.x` before upgrading to `8.x`.

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

## 1. Version Support changes:

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

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

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

Expand Down Expand Up @@ -568,10 +567,6 @@ Sentry.getGlobalScope().addEventProcessor(event => {
});
```

#### Removal of `lastEventId()` method

The `lastEventId` function has been removed. See [below](./MIGRATION.md#deprecate-lasteventid) for more details.

#### Removal of `void` from transport return types

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

#### Removal of `Sentry.Handlers.requestHandler()`, `Sentry.Handlers.tracingHandler()` and `Sentry.Handlers.errorHandler()`

For Express and Connect you previously had to use `Sentry.Handlers.requestHandler()`,
`Sentry.Handlers.tracingHandler()`, and `Sentry.Handlers.errorHandler()` to add Sentry instrumentation to your app. In
8.x, you only need to use the framework specific error handler (e.g `Sentry.setupExpressErrorHandler(app)`), you can
remove all other handlers.

```js
// v7
import * as Sentry from '@sentry/node';
Expand Down Expand Up @@ -1569,7 +1571,7 @@ If you are using the `Hub` right now, see the following table on how to migrate
| captureException() | `Sentry.captureException()` |
| captureMessage() | `Sentry.captureMessage()` |
| captureEvent() | `Sentry.captureEvent()` |
| lastEventId() | REMOVED - Use event processors or beforeSend instead |
| lastEventId() | `Sentry.lastEventId()` |
| addBreadcrumb() | `Sentry.addBreadcrumb()` |
| setUser() | `Sentry.setUser()` |
| setTags() | `Sentry.setTags()` |
Expand Down Expand Up @@ -1690,35 +1692,6 @@ app.get('/your-route', req => {
});
```

## Deprecate `Sentry.lastEventId()` and `hub.lastEventId()`

`Sentry.lastEventId()` sometimes causes race conditions, so we are deprecating it in favour of the `beforeSend`
callback.

```js
// Before
Sentry.init({
beforeSend(event, hint) {
const lastCapturedEventId = Sentry.lastEventId();

// Do something with `lastCapturedEventId` here

return event;
},
});

// After
Sentry.init({
beforeSend(event, hint) {
const lastCapturedEventId = event.event_id;

// Do something with `lastCapturedEventId` here

return event;
},
});
```

## Deprecated fields on `Span` and `Transaction`

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

## Deprecate `lastEventId()`

Instead, if you need the ID of a recently captured event, we recommend using `beforeSend` instead:

```ts
import * as Sentry from '@sentry/browser';

Sentry.init({
dsn: '__DSN__',
beforeSend(event, hint) {
const lastCapturedEventId = event.event_id;

// Do something with `lastCapturedEventId` here

return event;
},
});
```

## Deprecate `timestampWithMs` export - #7878

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

0 comments on commit b135be6

Please sign in to comment.