Skip to content

Commit 2fe22d4

Browse files
committed
Update node-nestjs e2e test
1 parent 4685987 commit 2fe22d4

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

dev-packages/e2e-tests/test-applications/node-nestjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@nestjs/common": "^10.0.0",
1919
"@nestjs/core": "^10.0.0",
2020
"@nestjs/platform-express": "^10.0.0",
21-
"@sentry/node": "latest || *",
21+
"@sentry/nestjs": "latest || *",
2222
"@sentry/types": "latest || *",
2323
"reflect-metadata": "^0.2.0",
2424
"rxjs": "^7.8.1"

dev-packages/e2e-tests/test-applications/node-nestjs/src/app.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from '@nestjs/common';
2-
import * as Sentry from '@sentry/node';
2+
import * as Sentry from '@sentry/nestjs';
33
import { makeHttpRequest } from './utils';
44

55
@Injectable()

dev-packages/e2e-tests/test-applications/node-nestjs/src/instrument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Sentry from '@sentry/node';
1+
import * as Sentry from '@sentry/nestjs';
22

33
Sentry.init({
44
environment: 'qa', // dynamic sampling bias to keep transactions

dev-packages/e2e-tests/test-applications/node-nestjs/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import './instrument';
33

44
// Import other modules
55
import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core';
6-
import * as Sentry from '@sentry/node';
6+
import * as Sentry from '@sentry/nestjs';
77
import { AppModule1, AppModule2 } from './app.module';
88

99
const app1Port = 3030;

dev-packages/e2e-tests/test-applications/node-nestjs/start-event-proxy.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/test-utils';
22

33
startEventProxyServer({
44
port: 3031,
5-
proxyServerName: 'node-nestjs',
5+
proxyServerName: 'nestjs',
66
});

dev-packages/e2e-tests/test-applications/node-nestjs/tests/errors.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
22
import { waitForError } from '@sentry-internal/test-utils';
33

44
test('Sends exception to Sentry', async ({ baseURL }) => {
5-
const errorEventPromise = waitForError('node-nestjs', event => {
5+
const errorEventPromise = waitForError('nestjs', event => {
66
return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123';
77
});
88

dev-packages/e2e-tests/test-applications/node-nestjs/tests/propagation.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { SpanJSON } from '@sentry/types';
66
test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
77
const id = crypto.randomUUID();
88

9-
const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
9+
const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
1010
return (
1111
transactionEvent.contexts?.trace?.op === 'http.server' &&
1212
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}`
1313
);
1414
});
1515

16-
const outboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
16+
const outboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
1717
return (
1818
transactionEvent.contexts?.trace?.op === 'http.server' &&
1919
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http/${id}`
@@ -121,14 +121,14 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
121121
test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
122122
const id = crypto.randomUUID();
123123

124-
const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
124+
const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
125125
return (
126126
transactionEvent?.contexts?.trace?.op === 'http.server' &&
127127
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-inbound-headers/${id}`
128128
);
129129
});
130130

131-
const outboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
131+
const outboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
132132
return (
133133
transactionEvent?.contexts?.trace?.op === 'http.server' &&
134134
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch/${id}`
@@ -234,7 +234,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
234234
});
235235

236236
test('Propagates trace for outgoing external http requests', async ({ baseURL }) => {
237-
const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
237+
const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
238238
return (
239239
transactionEvent?.contexts?.trace?.op === 'http.server' &&
240240
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-allowed`
@@ -271,7 +271,7 @@ test('Propagates trace for outgoing external http requests', async ({ baseURL })
271271
});
272272

273273
test('Does not propagate outgoing http requests not covered by tracePropagationTargets', async ({ baseURL }) => {
274-
const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
274+
const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
275275
return (
276276
transactionEvent?.contexts?.trace?.op === 'http.server' &&
277277
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-http-external-disallowed`
@@ -295,7 +295,7 @@ test('Does not propagate outgoing http requests not covered by tracePropagationT
295295
});
296296

297297
test('Propagates trace for outgoing external fetch requests', async ({ baseURL }) => {
298-
const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
298+
const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
299299
return (
300300
transactionEvent?.contexts?.trace?.op === 'http.server' &&
301301
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-allowed`
@@ -332,7 +332,7 @@ test('Propagates trace for outgoing external fetch requests', async ({ baseURL }
332332
});
333333

334334
test('Does not propagate outgoing fetch requests not covered by tracePropagationTargets', async ({ baseURL }) => {
335-
const inboundTransactionPromise = waitForTransaction('node-nestjs', transactionEvent => {
335+
const inboundTransactionPromise = waitForTransaction('nestjs', transactionEvent => {
336336
return (
337337
transactionEvent?.contexts?.trace?.op === 'http.server' &&
338338
transactionEvent.contexts?.trace?.data?.['http.target'] === `/test-outgoing-fetch-external-disallowed`

dev-packages/e2e-tests/test-applications/node-nestjs/tests/transactions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33

44
test('Sends an API route transaction', async ({ baseURL }) => {
5-
const pageloadTransactionEventPromise = waitForTransaction('node-nestjs', transactionEvent => {
5+
const pageloadTransactionEventPromise = waitForTransaction('nestjs', transactionEvent => {
66
return (
77
transactionEvent?.contexts?.trace?.op === 'http.server' &&
88
transactionEvent?.transaction === 'GET /test-transaction'

0 commit comments

Comments
 (0)