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

meta(changelog): Update changelog for 8.19.0 #12976

Merged
merged 23 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
54a889e
ci: Fix nextjs-15 canary tests (#12918)
lforst Jul 16, 2024
52eb466
feat(deps): bump @opentelemetry/instrumentation-aws-sdk from 0.42.0 t…
dependabot[bot] Jul 16, 2024
626d00a
Merge branch 'develop' into ab/sync-master
andreiborza Jul 16, 2024
bcebd87
Merge pull request #12935 from getsentry/ab/sync-master
andreiborza Jul 16, 2024
8b24731
feat(node): Add `request` parameter to `httpIntegration` ignore callb…
Lms24 Jul 16, 2024
29c90c5
feat(deps): bump @prisma/instrumentation from 5.16.1 to 5.17.0 (#12937)
dependabot[bot] Jul 16, 2024
c7e7cc9
feat(deps): bump @sentry/cli from 2.32.1 to 2.32.2 (#12923)
dependabot[bot] Jul 16, 2024
7adbec4
feat(deps): bump @opentelemetry/instrumentation-aws-lambda from 0.42.…
dependabot[bot] Jul 16, 2024
a8bce24
docs: Add docs about resolving gitflow merge conflicts (#12936)
mydea Jul 17, 2024
36d1d43
meta(changelog): Add missing contributor attribution (#12946)
andreiborza Jul 17, 2024
e710f3b
fix(browser): Fix bug causing unintentional dropping of transactions …
lforst Jul 17, 2024
5ceb1f4
chore: Update changed package paths (#12954)
AbhiPrasad Jul 17, 2024
80d76c9
test(vercel-edge): Switch to using vitest (#12958)
AbhiPrasad Jul 17, 2024
b4272be
test(replay): Switch to using vitest for replay worker (#12961)
AbhiPrasad Jul 17, 2024
d70182e
test(replay-canvas): Switch to using vitest (#12964)
AbhiPrasad Jul 17, 2024
ce1e7c7
docs(nestjs): Update README to include SentryCron (#12972)
nicohrubec Jul 18, 2024
935bb61
feat(core): Align Span interface with OTEL (#12898)
chargome Jul 18, 2024
d629991
tests(e2e): Refactor nestjs e2e applications into multiple smaller te…
nicohrubec Jul 18, 2024
1619efc
fix(feedback): add a missing call of Actor.appendToDom method when DO…
jaspreet57 Jul 18, 2024
803220e
ref: Add external contributor to CHANGELOG.md (#12974)
github-actions[bot] Jul 18, 2024
7500b06
fix(angular): Remove `afterSendEvent` listener once root injector is …
arturovt Jul 18, 2024
7d7164a
ref: Add external contributor to CHANGELOG.md (#12975)
github-actions[bot] Jul 18, 2024
c7ff1a9
meta(changelog): Update changelog for 8.19.0
andreiborza Jul 18, 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
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ jobs:
- *shared
- 'packages/browser/**'
- 'packages/browser-utils/**'
- 'packages/replay/**'
- 'packages/replay-internal/**'
- 'packages/replay-worker/**'
- 'packages/replay-canvas/**'
- 'packages/feedback/**'
- 'packages/wasm/**'
Expand All @@ -131,6 +132,7 @@ jobs:
- *node
- 'packages/nextjs/**'
- 'packages/react/**'
- 'packages/vercel-edge/**'
remix:
- *shared
- *browser
Expand All @@ -147,8 +149,10 @@ jobs:
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
deno:
- *shared
- *browser
- 'packages/deno/**'
bun:
- *shared
- 'packages/bun/**'
any_code:
- '!**/*.md'

Expand All @@ -166,6 +170,7 @@ jobs:
changed_profiling_node: ${{ steps.changed.outputs.profiling_node }}
changed_profiling_node_bindings: ${{ steps.changed.outputs.profiling_node_bindings }}
changed_deno: ${{ steps.changed.outputs.deno }}
changed_bun: ${{ steps.changed.outputs.bun }}
changed_browser: ${{ steps.changed.outputs.browser }}
changed_browser_integration: ${{ steps.changed.outputs.browser_integration }}
changed_any_code: ${{ steps.changed.outputs.any_code }}
Expand Down Expand Up @@ -451,6 +456,7 @@ jobs:
job_bun_unit_tests:
name: Bun Unit Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_bun == 'true' || github.event_name != 'pull_request'
timeout-minutes: 10
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -1031,7 +1037,9 @@ jobs:
'generic-ts3.8',
'node-fastify',
'node-hapi',
'nestjs',
'nestjs-basic',
'nestjs-distributed-tracing',
'nestjs-with-submodules',
'node-exports-test-app',
'node-koa',
'node-connect',
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@

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

## 8.19.0

- feat(core): Align Span interface with OTEL (#12898)
- fix(angular): Remove `afterSendEvent` listener once root injector is destroyed (#12786)
- fix(browser): Fix bug causing unintentional dropping of transactions (#12933)
- fix(feedback): Add a missing call of Actor.appendToDom method when DOMContentLoaded event is triggered (#12973)

Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution!

## 8.18.0

### Important Changes
Expand Down Expand Up @@ -38,7 +47,7 @@ instead. If you want to disable performance monitoring, remove the `tracesSample
- fix(tracing): Ensure you can pass `null` as `parentSpan` in `startSpan*` (#12928)
- ref(core): Small bundle size improvement (#12830)

Work in this release was contributed by @GitSquared and @mcous. Thank you for your contributions!
Work in this release was contributed by @GitSquared, @ziyadkhalil and @mcous. Thank you for your contributions!

## 8.17.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nestjs",
"name": "nestjs-basic",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Controller, Get, Param } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}

@Get('test-transaction')
testTransaction() {
return this.appService.testTransaction();
}

@Get('test-exception/:id')
async testException(@Param('id') id: string) {
return this.appService.testException(id);
}

@Get('test-expected-exception/:id')
async testExpectedException(@Param('id') id: string) {
return this.appService.testExpectedException(id);
}

@Get('test-span-decorator-async')
async testSpanDecoratorAsync() {
return { result: await this.appService.testSpanDecoratorAsync() };
}

@Get('test-span-decorator-sync')
async testSpanDecoratorSync() {
return { result: await this.appService.testSpanDecoratorSync() };
}

@Get('kill-test-cron')
async killTestCron() {
this.appService.killTestCron();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { ScheduleModule } from '@nestjs/schedule';
import { AppController } from './app.controller';
import { AppService } from './app.service';

@Module({
imports: [ScheduleModule.forRoot()],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Cron, SchedulerRegistry } from '@nestjs/schedule';
import * as Sentry from '@sentry/nestjs';
import { SentryCron, SentryTraced } from '@sentry/nestjs';
import type { MonitorConfig } from '@sentry/types';
import { makeHttpRequest } from './utils';

const monitorConfig: MonitorConfig = {
schedule: {
Expand All @@ -13,53 +12,15 @@ const monitorConfig: MonitorConfig = {
};

@Injectable()
export class AppService1 {
export class AppService {
constructor(private schedulerRegistry: SchedulerRegistry) {}

testSuccess() {
return { version: 'v1' };
}

testParam(id: string) {
return {
paramWas: id,
};
}

testInboundHeaders(headers: Record<string, string>, id: string) {
return {
headers,
id,
};
}

async testOutgoingHttp(id: string) {
const data = await makeHttpRequest(`http://localhost:3030/test-inbound-headers/${id}`);

return data;
}

async testOutgoingFetch(id: string) {
const response = await fetch(`http://localhost:3030/test-inbound-headers/${id}`);
const data = await response.json();

return data;
}

testTransaction() {
Sentry.startSpan({ name: 'test-span' }, () => {
Sentry.startSpan({ name: 'child-span' }, () => {});
});
}

async testError() {
const exceptionId = Sentry.captureException(new Error('This is an error'));

await Sentry.flush(2000);

return { exceptionId };
}

testException(id: string) {
throw new Error(`This is an exception with id ${id}`);
}
Expand All @@ -68,26 +29,6 @@ export class AppService1 {
throw new HttpException(`This is an expected exception with id ${id}`, HttpStatus.FORBIDDEN);
}

async testOutgoingFetchExternalAllowed() {
const fetchResponse = await fetch('http://localhost:3040/external-allowed');

return fetchResponse.json();
}

async testOutgoingFetchExternalDisallowed() {
const fetchResponse = await fetch('http://localhost:3040/external-disallowed');

return fetchResponse.json();
}

async testOutgoingHttpExternalAllowed() {
return makeHttpRequest('http://localhost:3040/external-allowed');
}

async testOutgoingHttpExternalDisallowed() {
return makeHttpRequest('http://localhost:3040/external-disallowed');
}

@SentryTraced('wait and return a string')
async wait() {
await new Promise(resolve => setTimeout(resolve, 500));
Expand Down Expand Up @@ -124,20 +65,3 @@ export class AppService1 {
this.schedulerRegistry.deleteCronJob('test-cron-job');
}
}

@Injectable()
export class AppService2 {
externalAllowed(headers: Record<string, string>) {
return {
headers,
route: 'external-allowed',
};
}

externalDisallowed(headers: Record<string, string>) {
return {
headers,
route: 'external-disallowed',
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as Sentry from '@sentry/nestjs';

Sentry.init({
environment: 'qa', // dynamic sampling bias to keep transactions
dsn: process.env.E2E_TEST_DSN,
tunnel: `http://localhost:3031/`, // proxy server
tracesSampleRate: 1,
});
20 changes: 20 additions & 0 deletions dev-packages/e2e-tests/test-applications/nestjs-basic/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Import this first
import './instrument';

// Import other modules
import { BaseExceptionFilter, HttpAdapterHost, NestFactory } from '@nestjs/core';
import * as Sentry from '@sentry/nestjs';
import { AppModule } from './app.module';

const PORT = 3030;

async function bootstrap() {
const app = await NestFactory.create(AppModule);

const { httpAdapter } = app.get(HttpAdapterHost);
Sentry.setupNestErrorHandler(app, new BaseExceptionFilter(httpAdapter));

await app.listen(PORT);
}

bootstrap();
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,3 @@ test('Does not send expected exception to Sentry', async ({ baseURL }) => {

expect(errorEventOccurred).toBe(false);
});

test('Does not handle expected exception if exception is thrown in module', async ({ baseURL }) => {
const errorEventPromise = waitForError('nestjs', event => {
return !event.type && event.exception?.values?.[0]?.value === 'Something went wrong in the test module!';
});

const response = await fetch(`${baseURL}/test-module`);
expect(response.status).toBe(500); // should be 400

// should never arrive, but does because the exception is not handled properly
const errorEvent = await errorEventPromise;

expect(errorEvent.exception?.values).toHaveLength(1);
expect(errorEvent.exception?.values?.[0]?.value).toBe('Something went wrong in the test module!');

expect(errorEvent.request).toEqual({
method: 'GET',
cookies: {},
headers: expect.any(Object),
url: 'http://localhost:3030/test-module',
});

expect(errorEvent.transaction).toEqual('GET /test-module');

expect(errorEvent.contexts?.trace).toEqual({
trace_id: expect.any(String),
span_id: expect.any(String),
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# compiled output
/dist
/node_modules
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@sentry:registry=http://127.0.0.1:4873
@sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
}
}
Loading
Loading