Skip to content

Commit

Permalink
Merge pull request #11950 from getsentry/prepare-release/8.0.0-rc.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored May 8, 2024
2 parents 2a46181 + a4c30a2 commit 57bef20
Show file tree
Hide file tree
Showing 133 changed files with 1,415 additions and 796 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ jobs:
[
'angular-17',
'cloudflare-astro',
'node-express-app',
'node-express',
'create-react-app',
'create-next-app',
'create-remix-app',
Expand All @@ -1015,13 +1015,12 @@ jobs:
'sveltekit-2',
'sveltekit-2-svelte-5',
'generic-ts3.8',
'node-fastify-app',
# TODO(v8): Re-enable hapi tests
'node-fastify',
'node-hapi',
'node-nestjs-app',
'node-nestjs',
'node-exports-test-app',
'node-koa-app',
'node-connect-app',
'node-koa',
'node-connect',
'vue-3',
'webpack-4',
'webpack-5'
Expand Down
1 change: 1 addition & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ module.exports = [
'zlib',
'net',
'tls',
'module',
],
gzip: true,
limit: '180 KB',
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@

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

## 8.0.0-rc.2

### Important Changes

- **feat(node): Register ESM patching hooks in init for supported Node.js versions**

This release includes adds support for ESM when `Sentry.init()` is called within a module imported via the `--import`
Node.js flag:

```sh
node --import ./your-file-with-sentry-init.mjs your-app.mjs
```

Note that the SDK only supports ESM for node versions `18.19.0` and above, and `20.6.0` above.

### Other Changes

- deps(node): Bump `@opentelemetry/core` to `1.24.1` and `@opentelemetry/instrumentation` to `0.51.1` (#11941)
- feat(connect): Warn if connect is not instrumented (#11936)
- feat(express): Warn if express is not instrumented (#11930)
- feat(fastify): Warn if fastify is not instrumented (#11917)
- feat(hapi): Warn if hapi is not instrumented (#11937)
- feat(koa): Warn if koa is not instrumented (#11931)
- fix(browser): Continuously record CLS web vital (#11934)
- fix(feedback): Pick user from any scope (#11928)
- fix(node): Fix cron instrumentation and add tests (#11811)

## 8.0.0-rc.1

This release contains no changes and was done for technical purposes. This version is considered stable.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "node-connect-app",
"name": "node-connect",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/event-proxy-server';

startEventProxyServer({
port: 3031,
proxyServerName: 'node-koa-app',
proxyServerName: 'node-connect',
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test('Sends exception to Sentry', async ({ baseURL }) => {
});

test('Sends correct error event', async ({ baseURL }) => {
const errorEventPromise = waitForError('node-connect-app', event => {
const errorEventPromise = waitForError('node-connect', event => {
return !event.type && event.exception?.values?.[0]?.value === 'This is an exception';
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT;
const EVENT_POLLING_TIMEOUT = 90_000;

test('Sends an API route transaction', async ({ baseURL }) => {
const pageloadTransactionEventPromise = waitForTransaction('node-connect-app', transactionEvent => {
const pageloadTransactionEventPromise = waitForTransaction('node-connect', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent?.transaction === 'GET /test-transaction'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/event-proxy-server';

startEventProxyServer({
port: 3031,
proxyServerName: 'node-nestjs-app',
proxyServerName: 'node-express',
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test('Sends exception to Sentry', async ({ baseURL }) => {
});

test('Sends correct error event', async ({ baseURL }) => {
const errorEventPromise = waitForError('node-express-app', event => {
const errorEventPromise = waitForError('node-express', event => {
return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123';
});

Expand Down Expand Up @@ -109,7 +109,7 @@ test('Should record caught exceptions with local variable', async ({ baseURL })
});

test('Should record uncaught exceptions with local variable', async ({ baseURL }) => {
const errorEventPromise = waitForError('node-express-app', errorEvent => {
const errorEventPromise = waitForError('node-express', errorEvent => {
return !!errorEvent?.exception?.values?.[0]?.value?.includes('Uncaught Local Variable Error');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
import type { AppRouter } from '../src/app';

test('Should record span for trpc query', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('node-express-app', transactionEvent => {
const transactionEventPromise = waitForTransaction('node-express', transactionEvent => {
return (
transactionEvent.transaction === 'GET /trpc' &&
!!transactionEvent.spans?.find(span => span.description === 'trpc/getSomething')
Expand Down Expand Up @@ -41,7 +41,7 @@ test('Should record span for trpc query', async ({ baseURL }) => {
});

test('Should record transaction for trpc mutation', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('node-express-app', transactionEvent => {
const transactionEventPromise = waitForTransaction('node-express', transactionEvent => {
return (
transactionEvent.transaction === 'POST /trpc' &&
!!transactionEvent.spans?.find(span => span.description === 'trpc/createSomething')
Expand Down Expand Up @@ -77,14 +77,14 @@ test('Should record transaction for trpc mutation', async ({ baseURL }) => {
});

test('Should record transaction and error for a crashing trpc handler', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('node-express-app', transactionEvent => {
const transactionEventPromise = waitForTransaction('node-express', transactionEvent => {
return (
transactionEvent.transaction === 'POST /trpc' &&
!!transactionEvent.spans?.find(span => span.description === 'trpc/crashSomething')
);
});

const errorEventPromise = waitForError('node-express-app', errorEvent => {
const errorEventPromise = waitForError('node-express', errorEvent => {
return !!errorEvent?.exception?.values?.some(exception => exception.value?.includes('I crashed in a trpc handler'));
});

Expand All @@ -103,14 +103,14 @@ test('Should record transaction and error for a crashing trpc handler', async ({
});

test('Should record transaction and error for a trpc handler that returns a status code', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('node-express-app', transactionEvent => {
const transactionEventPromise = waitForTransaction('node-express', transactionEvent => {
return (
transactionEvent.transaction === 'POST /trpc' &&
!!transactionEvent.spans?.find(span => span.description === 'trpc/dontFindSomething')
);
});

const errorEventPromise = waitForError('node-express-app', errorEvent => {
const errorEventPromise = waitForError('node-express', errorEvent => {
return !!errorEvent?.exception?.values?.some(exception => exception.value?.includes('Page not found'));
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "node-fastify-app",
"name": "node-fastify",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/event-proxy-server';

startEventProxyServer({
port: 3031,
proxyServerName: 'node-connect-app',
proxyServerName: 'node-fastify',
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test('Sends exception to Sentry', async ({ baseURL }) => {
});

test('Sends correct error event', async ({ baseURL }) => {
const errorEventPromise = waitForError('node-koa-app', event => {
const errorEventPromise = waitForError('node-fastify', event => {
return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123';
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import axios from 'axios';
test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
const id = crypto.randomUUID();

const inboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}`
);
});

const outboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const outboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http/${id}`
Expand Down Expand Up @@ -121,14 +121,14 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
const id = crypto.randomUUID();

const inboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}`
);
});

const outboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const outboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch/${id}`
Expand Down Expand Up @@ -233,7 +233,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
});

test('Propagates trace for outgoing external http requests', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-allowed`
Expand Down Expand Up @@ -269,7 +269,7 @@ test('Propagates trace for outgoing external http requests', async ({ baseURL })
});

test('Does not propagate outgoing http requests not covered by tracePropagationTargets', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-disallowed`
Expand All @@ -292,7 +292,7 @@ test('Does not propagate outgoing http requests not covered by tracePropagationT
});

test('Propagates trace for outgoing external fetch requests', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-allowed`
Expand Down Expand Up @@ -328,7 +328,7 @@ test('Propagates trace for outgoing external fetch requests', async ({ baseURL }
});

test('Does not propagate outgoing fetch requests not covered by tracePropagationTargets', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-disallowed`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT;
const EVENT_POLLING_TIMEOUT = 90_000;

test('Sends an API route transaction', async ({ baseURL }) => {
const pageloadTransactionEventPromise = waitForTransaction('node-fastify-app', transactionEvent => {
const pageloadTransactionEventPromise = waitForTransaction('node-fastify', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent?.transaction === 'GET /test-transaction'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "node-koa-app",
"name": "node-koa",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/event-proxy-server';

startEventProxyServer({
port: 3031,
proxyServerName: 'node-fastify-app',
proxyServerName: 'node-koa',
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test('Sends exception to Sentry', async ({ baseURL }) => {
});

test('Sends correct error event', async ({ baseURL }) => {
const errorEventPromise = waitForError('node-fastify-app', event => {
const errorEventPromise = waitForError('node-koa', event => {
return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123';
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import axios from 'axios';
test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
const id = crypto.randomUUID();

const inboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}`
);
});

const outboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const outboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http/${id}`
Expand Down Expand Up @@ -121,14 +121,14 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
const id = crypto.randomUUID();

const inboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}`
);
});

const outboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const outboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch/${id}`
Expand Down Expand Up @@ -233,7 +233,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
});

test('Propagates trace for outgoing external http requests', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-allowed`
Expand Down Expand Up @@ -269,7 +269,7 @@ test('Propagates trace for outgoing external http requests', async ({ baseURL })
});

test('Does not propagate outgoing http requests not covered by tracePropagationTargets', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-disallowed`
Expand All @@ -292,7 +292,7 @@ test('Does not propagate outgoing http requests not covered by tracePropagationT
});

test('Propagates trace for outgoing external fetch requests', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-allowed`
Expand Down Expand Up @@ -328,7 +328,7 @@ test('Propagates trace for outgoing external fetch requests', async ({ baseURL }
});

test('Does not propagate outgoing fetch requests not covered by tracePropagationTargets', async ({ baseURL }) => {
const inboundTransactionPromise = waitForTransaction('node-koa-app', transactionEvent => {
const inboundTransactionPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-disallowed`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT;
const EVENT_POLLING_TIMEOUT = 90_000;

test('Sends an API route transaction', async ({ baseURL }) => {
const pageloadTransactionEventPromise = waitForTransaction('node-koa-app', transactionEvent => {
const pageloadTransactionEventPromise = waitForTransaction('node-koa', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'http.server' &&
transactionEvent?.transaction === 'GET /test-transaction'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "node-nestjs-app",
"name": "node-nestjs",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
Loading

0 comments on commit 57bef20

Please sign in to comment.