Skip to content
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

Prepare release/8.3.0 #12171

Merged
merged 35 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5024b83
Merge pull request #12086 from getsentry/master
github-actions[bot] May 16, 2024
8fbff59
fix(node): Update `@prisma/instrumentation` from 5.13.0 to 5.14.0 (#1…
mydea May 17, 2024
56570b3
fix(core): Add dsn to span envelope header (#12096)
mydea May 17, 2024
9bbdfe7
feat(node): Do not create GraphQL resolver spans by default (#12097)
mydea May 17, 2024
2f88a5f
chore: Resolve or postpone a random assortment of TODOs (#11977)
lforst May 17, 2024
dc9ed37
test(nestjs): Better e2e test for nest.js (#12075)
mydea May 17, 2024
b43779e
docs: Add migration docs to point out that default import does not wo…
mydea May 17, 2024
5317793
feat(node): Ensure fastify spans have better data (#12106)
mydea May 17, 2024
de60306
feat(node): Ensure express spans have better data (#12107)
mydea May 21, 2024
a61eec7
fix(feedback): Set optionOverrides to be optional in TS definition (#…
ryan953 May 21, 2024
53298b9
feat(node): Ensure koa spans have better data (#12108)
mydea May 21, 2024
ad4e9f7
fix(nextjs): Don't put `undefined` values in props (#12131)
lforst May 21, 2024
85db0de
fix(nextjs): Fix legacy configuration method detection for emitting w…
lforst May 21, 2024
77ff5d9
feat(node): Ensure connect spans have better data (#12130)
mydea May 21, 2024
c8f1661
ref(node): Handle failing hook registration gracefully (#12135)
mydea May 21, 2024
344cd9d
ref(node): Add log for running in ESM/CommonJS mode (#12134)
mydea May 21, 2024
99351c3
feat(node): Use `node:` prefix for node built-ins (#11895)
timfish May 21, 2024
7e59832
feat(node): Ensure Nest.js spans have better data (#12139)
mydea May 21, 2024
eec0687
feat(node): Ensure Hapi spans have better data (#12140)
mydea May 21, 2024
abe31ba
chore: Align and update MIT license dates (#12143)
AbhiPrasad May 21, 2024
f3c8a86
fix(feedback): Improve feedback border color in dark-mode, and preven…
ryan953 May 21, 2024
4420844
feat(node): Add app.free_memory info to events (#12150)
AbhiPrasad May 21, 2024
10fbee2
ci: Fix size limit webpack resolving (#12145)
lforst May 22, 2024
4786a83
feat(nextjs): Ignore Prisma critical dependency warnings (#12144)
lforst May 22, 2024
85158c5
doc(migration): Add entry for runWithAsyncContext (#12153)
AbhiPrasad May 22, 2024
f7bd662
feat(google-cloud): Expose ESM build (#12149)
AbhiPrasad May 22, 2024
a30fbbc
ref(node): Only show instrumentation warning when tracing is enabled …
andreiborza May 22, 2024
a7aa8a0
fix(node): Ensure fetch/http breadcrumbs are created correctly (#12137)
mydea May 22, 2024
6cb60a3
docs(sveltekit): process.env.SENTRY_AUTH_TOKEN (#12118)
pboling May 22, 2024
b7699d4
feat(browser): Ensure `browserProfilingIntegration` is published to C…
mydea May 22, 2024
37a83ef
feat(deps): Bump @opentelemetry/instrumentation-express from 0.38.0 t…
dependabot[bot] May 22, 2024
88e002d
feat(node): No-code init via `--import=@sentry/node/init` (#11999)
timfish May 22, 2024
772269a
feat(replay): Use unwrapped `setTimeout` to avoid e.g. angular change…
billyvg May 22, 2024
53d814b
ref: Fix circular dependency checks & setup (#12159)
mydea May 22, 2024
14d1c94
meta(changelog): Update changelog for v8.3.0
mydea May 22, 2024
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
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://examplePublicKey@o0.ingest.sentry.io/0 node --import=@sentry/node/init app.mjs
```

When using CommonJS, you can do:

```bash
SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/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
Loading