Skip to content

Commit b8916bb

Browse files
authored
Merge pull request #16342 from getsentry/prepare-release/9.21.0
meta(changelog): Update changelog for 9.21.0
2 parents 408b7d8 + 8902822 commit b8916bb

File tree

25 files changed

+797
-181
lines changed

25 files changed

+797
-181
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010

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

13+
## 9.21.0
14+
15+
- docs: Fix v7 migration link ([#14629](https://github.com/getsentry/sentry-javascript/pull/14629))
16+
- feat(node): Vendor in `@fastify/otel` ([#16328](https://github.com/getsentry/sentry-javascript/pull/16328))
17+
- fix(nestjs): Handle multiple `OnEvent` decorators ([#16306](https://github.com/getsentry/sentry-javascript/pull/16306))
18+
- fix(node): Avoid creating breadcrumbs for suppressed requests ([#16285](https://github.com/getsentry/sentry-javascript/pull/16285))
19+
- fix(remix): Add missing `client` exports to `server` and `cloudflare` entries ([#16341](https://github.com/getsentry/sentry-javascript/pull/16341))
20+
21+
Work in this release was contributed by @phthhieu. Thank you for your contribution!
22+
1323
## 9.20.0
1424

1525
### Important changes

dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/events.controller.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ export class EventsController {
1111

1212
return { message: 'Events emitted' };
1313
}
14+
15+
@Get('emit-multiple')
16+
async emitMultipleEvents() {
17+
await this.eventsService.emitMultipleEvents();
18+
19+
return { message: 'Events emitted' };
20+
}
1421
}

dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/events.service.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ export class EventsService {
1111

1212
return { message: 'Events emitted' };
1313
}
14+
15+
async emitMultipleEvents() {
16+
this.eventEmitter.emit('multiple.first', { data: 'test-first' });
17+
this.eventEmitter.emit('multiple.second', { data: 'test-second' });
18+
19+
return { message: 'Events emitted' };
20+
}
1421
}

dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/src/listeners/test-event.listener.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Injectable } from '@nestjs/common';
22
import { OnEvent } from '@nestjs/event-emitter';
3+
import * as Sentry from '@sentry/nestjs';
34

45
@Injectable()
56
export class TestEventListener {
@@ -13,4 +14,11 @@ export class TestEventListener {
1314
await new Promise(resolve => setTimeout(resolve, 100));
1415
throw new Error('Test error from event handler');
1516
}
17+
18+
@OnEvent('multiple.first')
19+
@OnEvent('multiple.second')
20+
async handleMultipleEvents(payload: any): Promise<void> {
21+
Sentry.setTag(payload.data, true);
22+
await new Promise(resolve => setTimeout(resolve, 100));
23+
}
1624
}

dev-packages/e2e-tests/test-applications/nestjs-distributed-tracing/tests/events.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,27 @@ test('Event emitter', async () => {
4040
status: 'ok',
4141
});
4242
});
43+
44+
test('Multiple OnEvent decorators', async () => {
45+
const firstTxPromise = waitForTransaction('nestjs-distributed-tracing', transactionEvent => {
46+
return transactionEvent.transaction === 'event multiple.first|multiple.second';
47+
});
48+
const secondTxPromise = waitForTransaction('nestjs-distributed-tracing', transactionEvent => {
49+
return transactionEvent.transaction === 'event multiple.first|multiple.second';
50+
});
51+
const rootPromise = waitForTransaction('nestjs-distributed-tracing', transactionEvent => {
52+
return transactionEvent.transaction === 'GET /events/emit-multiple';
53+
});
54+
55+
const eventsUrl = `http://localhost:3050/events/emit-multiple`;
56+
await fetch(eventsUrl);
57+
58+
const firstTx = await firstTxPromise;
59+
const secondTx = await secondTxPromise;
60+
const rootTx = await rootPromise;
61+
62+
expect(firstTx).toBeDefined();
63+
expect(secondTx).toBeDefined();
64+
// assert that the correct payloads were added
65+
expect(rootTx.tags).toMatchObject({ 'test-first': true, 'test-second': true });
66+
});

dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/scenario.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ async function run() {
88
await fetch(`${process.env.SERVER_URL}/api/v2`).then(res => res.text());
99
await fetch(`${process.env.SERVER_URL}/api/v3`).then(res => res.text());
1010

11+
await Sentry.suppressTracing(() => fetch(`${process.env.SERVER_URL}/api/v4`).then(res => res.text()));
12+
1113
Sentry.captureException(new Error('foo'));
1214
}
1315

dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createTestServer } from '../../../../utils/server';
44

55
describe('outgoing fetch', () => {
66
createEsmAndCjsTests(__dirname, 'scenario.mjs', 'instrument.mjs', (createRunner, test) => {
7-
test('outgoing fetch requests create breadcrumbs xxx', async () => {
7+
test('outgoing fetch requests create breadcrumbs', async () => {
88
const [SERVER_URL, closeTestServer] = await createTestServer().start();
99

1010
await createRunner()

dev-packages/node-integration-tests/suites/tracing/requests/http-breadcrumbs/scenario.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ async function run() {
99
await makeHttpRequest(`${process.env.SERVER_URL}/api/v2`);
1010
await makeHttpRequest(`${process.env.SERVER_URL}/api/v3`);
1111

12+
await Sentry.suppressTracing(() => makeHttpRequest(`${process.env.SERVER_URL}/api/v4`));
13+
1214
Sentry.captureException(new Error('foo'));
1315
}
1416

docs/changelog/v7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3714,7 +3714,7 @@ requires changes to certain configuration options or custom clients/integrations
37143714
a version of [self-hosted Sentry](https://develop.sentry.dev/self-hosted/) (aka onpremise) older than `20.6.0` then you
37153715
will need to [upgrade](https://develop.sentry.dev/self-hosted/releases/).**
37163716
3717-
For detailed overview of all the changes, please see our [v7 migration guide](./MIGRATION.md#upgrading-from-6x-to-7x).
3717+
For detailed overview of all the changes, please see our [v7 migration guide](/docs/migration/v6-to-v7.md).
37183718
37193719
### Breaking Changes
37203720

packages/browser/src/exports.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ export {
8484
} from './stack-parsers';
8585
export { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder';
8686
export { createUserFeedbackEnvelope } from './userfeedback';
87-
export { getDefaultIntegrations, forceLoad, init, onLoad, showReportDialog } from './sdk';
87+
export { getDefaultIntegrations, forceLoad, init, onLoad } from './sdk';
88+
export { showReportDialog } from './report-dialog';
8889

8990
export { breadcrumbsIntegration } from './integrations/breadcrumbs';
9091
export { globalHandlersIntegration } from './integrations/globalhandlers';

0 commit comments

Comments
 (0)