Skip to content

Commit

Permalink
Merge pull request #12171 from getsentry/prepare-release/8.3.0
Browse files Browse the repository at this point in the history
Prepare release/8.3.0
  • Loading branch information
andreiborza authored May 22, 2024
2 parents f6784c5 + 14d1c94 commit 9e35ed9
Show file tree
Hide file tree
Showing 181 changed files with 2,595 additions and 1,395 deletions.
7 changes: 7 additions & 0 deletions .madgerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"detectiveOptions": {
"ts": {
"skipTypeImports": true
}
}
}
42 changes: 5 additions & 37 deletions .size-limit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const builtinModules = require('module').builtinModules;
const nodePrefixedBuiltinModules = builtinModules.map(m => `node:${m}`);

module.exports = [
// Browser SDK (ESM)
{
Expand Down Expand Up @@ -190,24 +193,7 @@ module.exports = [
name: '@sentry/node',
path: 'packages/node/build/esm/index.js',
import: createImport('init'),
ignore: [
'node:http',
'node:https',
'node:diagnostics_channel',
'async_hooks',
'child_process',
'fs',
'os',
'path',
'inspector',
'worker_threads',
'http',
'stream',
'zlib',
'net',
'tls',
'module',
],
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '180 KB',
},
Expand All @@ -216,25 +202,7 @@ module.exports = [
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',
],
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '140 KB',
},
Expand Down
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,63 @@

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

## 8.3.0

### Important Changes

- **Better Node Framework Span Data**

This release improves data quality of spans emitted by Express, Fastify, Connect, Koa, Nest.js and Hapi.

- feat(node): Ensure connect spans have better data (#12130)
- feat(node): Ensure express spans have better data (#12107)
- feat(node): Ensure fastify spans have better data (#12106)
- feat(node): Ensure hapi spans have better data (#12140)
- feat(node): Ensure koa spans have better data (#12108)
- feat(node): Ensure Nest.js spans have better data (#12139)
- feat(deps): Bump @opentelemetry/instrumentation-express from 0.38.0 to 0.39.0 (#12079)

- **feat(node): No-code init via `--import=@sentry/node/init` (#11999)**

When using Sentry in ESM mode, you can now use Sentry without manually calling init like this:

```bash
SENTRY_DSN=https://[email protected]/0 node --import=@sentry/node/init app.mjs
```

When using CommonJS, you can do:

```bash
SENTRY_DSN=https://[email protected]/0 node --require=@sentry/node/init app.js
```

### Other Changes

- chore: Align and update MIT license dates (#12143)
- chore: Resolve or postpone a random assortment of TODOs (#11977)
- doc(migration): Add entry for runWithAsyncContext (#12153)
- docs: Add migration docs to point out that default import does not work (#12100)
- docs(sveltekit): process.env.SENTRY_AUTH_TOKEN (#12118)
- feat(browser): Ensure `browserProfilingIntegration` is published to CDN (#12158)
- feat(google-cloud): Expose ESM build (#12149)
- feat(nextjs): Ignore Prisma critical dependency warnings (#12144)
- feat(node): Add app.free_memory info to events (#12150)
- feat(node): Do not create GraphQL resolver spans by default (#12097)
- feat(node): Use `node:` prefix for node built-ins (#11895)
- feat(replay): Use unwrapped `setTimeout` to avoid e.g. angular change detection (#11924)
- fix(core): Add dsn to span envelope header (#12096)
- fix(feedback): Improve feedback border color in dark-mode, and prevent auto-dark mode when a theme is picked (#12126)
- fix(feedback): Set optionOverrides to be optional in TS definition (#12125)
- fix(nextjs): Don't put `undefined` values in props (#12131)
- fix(nextjs): Fix legacy configuration method detection for emitting warning (#12136)
- fix(node): Ensure fetch/http breadcrumbs are created correctly (#12137)
- fix(node): Update `@prisma/instrumentation` from 5.13.0 to 5.14.0 (#12081)
- ref(node): Add log for running in ESM/CommonJS mode (#12134)
- ref(node): Handle failing hook registration gracefully (#12135)
- ref(node): Only show instrumentation warning when tracing is enabled (#12141)

Work in this release contributed by @pboling. Thank you for your contribution!

## 8.2.1

- fix(aws-serverless): Fix build of lambda layer (#12083)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Functional Software, Inc. dba Sentry
Copyright (c) 2012-2024 Functional Software, Inc. dba Sentry

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
27 changes: 26 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,10 +706,11 @@ You can import from `@sentry/browser` (or from a respective SDK package like `@s
### Server-side SDKs (Node, Deno, Bun, etc.)
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`, `runWithAsyncContext`
- [Removal of `enableAnrDetection` and `Anr` class](./MIGRATION.md#removal-of-enableanrdetection-and-anr-class)
- [Removal of `deepReadDirSync` method](./MIGRATION.md#removal-of-deepreaddirsync-method)
- [Removal of `runWithAsyncContext` method](./MIGRATION.md#removal-of-runwithasynccontext-method)
#### Removal of `enableAnrDetection` and `Anr` class
Expand All @@ -720,6 +721,22 @@ The `enableAnrDetection` and `Anr` class have been removed. See the
The `deepReadDirSync` method has been removed. There is no replacement API.
#### Removal of `runWithAsyncContext` method
The `runWithAsyncContext` method has been removed in favour of `Sentry.withIsolationScope`.
```js
// before (v7)
Sentry.runWithAsyncContext(() => {
// Your code here...
});

// after (v8)
Sentry.withIsolationScope(() => {
// Your code here...
});
```
### Next.js SDK
Removed top-level exports: `withSentryApi`, `withSentryAPI`, `withSentryGetServerSideProps`, `withSentryGetStaticProps`,
Expand Down Expand Up @@ -1323,6 +1340,14 @@ export class HeaderComponent {
}
```

## 6. Build Changes

We now provide a proper ESM output of the SDK. There have also been some other build changes under the hood. One side
effect of this is that importing Sentry as a default import does not work anymore. Note that this was never supported
(even on v7) and this was never intended to work (and also not documented anywhere). However, it seems that for some
configuration combinations, it was still possible to do `import Sentry from '@sentry/browser'`. This is not possible
anymore in v8. Please use `import * as Sentry from '@sentry/browser'` instead.

# Upgrading Sentry Feedback (beta, 7.x to 8.0)

For details on upgrading Feedback from the beta 7.x to the release 8.x version, please view the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

const connectPort = 3030;
Expand All @@ -7,7 +6,7 @@ const eventProxyPort = 3031;
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
const config = {
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 150_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,22 @@ test('Sends an API route transaction', async ({ baseURL }) => {
},
{
data: {
'sentry.origin': 'manual',
'sentry.origin': 'auto.http.otel.connect',
'sentry.op': 'request_handler.connect',
'http.route': '/test-transaction',
'connect.type': 'request_handler',
'connect.name': '/test-transaction',
'otel.kind': 'INTERNAL',
},
description: 'request handler - /test-transaction',
op: 'request_handler.connect',
description: '/test-transaction',
parent_span_id: expect.any(String),
span_id: expect.any(String),
start_timestamp: expect.any(Number),
status: 'ok',
timestamp: expect.any(Number),
trace_id: expect.any(String),
origin: 'manual',
origin: 'auto.http.otel.connect',
},
],
transaction: 'GET /test-transaction',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"strict": true,
"noEmit": true
},
"include": ["*.ts"]
"include": ["src/*.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ test('Should record a transaction for route with parameters', async ({ request }
'http.route': '/',
'otel.kind': 'INTERNAL',
'sentry.origin': 'auto.http.otel.express',
'sentry.op': 'middleware.express',
},
description: 'middleware - query',
op: 'middleware.express',
description: 'query',
origin: 'auto.http.otel.express',
parent_span_id: expect.any(String),
span_id: expect.any(String),
Expand All @@ -86,8 +88,10 @@ test('Should record a transaction for route with parameters', async ({ request }
'http.route': '/',
'otel.kind': 'INTERNAL',
'sentry.origin': 'auto.http.otel.express',
'sentry.op': 'middleware.express',
},
description: 'middleware - expressInit',
op: 'middleware.express',
description: 'expressInit',
origin: 'auto.http.otel.express',
parent_span_id: expect.any(String),
span_id: expect.any(String),
Expand All @@ -104,8 +108,10 @@ test('Should record a transaction for route with parameters', async ({ request }
'http.route': '/test-transaction/:param',
'otel.kind': 'INTERNAL',
'sentry.origin': 'auto.http.otel.express',
'sentry.op': 'request_handler.express',
},
description: 'request handler - /test-transaction/:param',
op: 'request_handler.express',
description: '/test-transaction/:param',
origin: 'auto.http.otel.express',
parent_span_id: expect.any(String),
span_id: expect.any(String),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "18.15.1",
"express": "4.19.2",
"typescript": "4.9.5",
"zod": "^3.22.4"
"zod": "~3.22.4"
},
"devDependencies": {
"@sentry-internal/event-proxy-server": "link:../../../event-proxy-server",
Expand Down

This file was deleted.

Loading

0 comments on commit 9e35ed9

Please sign in to comment.