-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Tejas Mehta <[email protected]>
- Loading branch information
1 parent
bc5c7aa
commit b47ff29
Showing
27 changed files
with
793 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as Sentry from '@sentry/nestjs'; | ||
import { nodeProfilingIntegration } from '@sentry/profiling-node'; | ||
|
||
// Ensure to call this before importing any other modules! | ||
Sentry.init({ | ||
dsn: process.env.SENTRY_DSN, | ||
integrations: [ | ||
// Add our Profiling integration | ||
nodeProfilingIntegration(), | ||
], | ||
|
||
// Add Tracing by setting tracesSampleRate | ||
// We recommend adjusting this value in production | ||
tracesSampleRate: 1.0, | ||
|
||
// Set sampling rate for profiling | ||
// This is relative to tracesSampleRate | ||
profilesSampleRate: 1.0, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as Sentry from '@sentry/nestjs'; | ||
import { nodeProfilingIntegration } from '@sentry/profiling-node'; | ||
|
||
// Ensure to call this before importing any other modules! | ||
Sentry.init({ | ||
dsn: process.env.SENTRY_DSN, | ||
integrations: [ | ||
// Add our Profiling integration | ||
nodeProfilingIntegration(), | ||
], | ||
|
||
// Add Tracing by setting tracesSampleRate | ||
// We recommend adjusting this value in production | ||
tracesSampleRate: 1.0, | ||
|
||
// Set sampling rate for profiling | ||
// This is relative to tracesSampleRate | ||
profilesSampleRate: 1.0, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Catch, ArgumentsHost } from '@nestjs/common'; | ||
import { BaseExceptionFilter } from '@nestjs/core'; | ||
import { RpcException } from '@nestjs/microservices'; | ||
import * as Sentry from '@sentry/node'; | ||
|
||
@Catch() | ||
export class SentryFilter extends BaseExceptionFilter { | ||
catch(exception: any, host: ArgumentsHost) { | ||
if (!(exception instanceof RpcException)) { | ||
Sentry.captureException(exception); | ||
} | ||
super.catch(exception, host); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as Sentry from '@sentry/nestjs'; | ||
import { nodeProfilingIntegration } from '@sentry/profiling-node'; | ||
|
||
// Ensure to call this before importing any other modules! | ||
Sentry.init({ | ||
dsn: process.env.SENTRY_DSN, | ||
integrations: [ | ||
// Add our Profiling integration | ||
nodeProfilingIntegration(), | ||
], | ||
|
||
// Add Tracing by setting tracesSampleRate | ||
// We recommend adjusting this value in production | ||
tracesSampleRate: 1.0, | ||
|
||
// Set sampling rate for profiling | ||
// This is relative to tracesSampleRate | ||
profilesSampleRate: 1.0, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as Sentry from '@sentry/nestjs'; | ||
import { nodeProfilingIntegration } from '@sentry/profiling-node'; | ||
|
||
// Ensure to call this before importing any other modules! | ||
Sentry.init({ | ||
dsn: process.env.SENTRY_DSN, | ||
integrations: [ | ||
// Add our Profiling integration | ||
nodeProfilingIntegration(), | ||
], | ||
|
||
// Add Tracing by setting tracesSampleRate | ||
// We recommend adjusting this value in production | ||
tracesSampleRate: 1.0, | ||
|
||
// Set sampling rate for profiling | ||
// This is relative to tracesSampleRate | ||
profilesSampleRate: 1.0, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Catch, ArgumentsHost } from '@nestjs/common'; | ||
import { BaseExceptionFilter } from '@nestjs/core'; | ||
import { RpcException } from '@nestjs/microservices'; | ||
import * as Sentry from '@sentry/node'; | ||
|
||
@Catch() | ||
export class SentryFilter extends BaseExceptionFilter { | ||
catch(exception: any, host: ArgumentsHost) { | ||
if (!(exception instanceof RpcException)) { | ||
Sentry.captureException(exception); | ||
} | ||
super.catch(exception, host); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.