File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
Original file line number Diff line number Diff line change @@ -2,18 +2,21 @@ import * as Sentry from '@sentry/nestjs';
22import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
33
44// Ensure to call this before importing any other modules!
5- Sentry . init ( {
6- dsn : process . env . SENTRY_DSN ,
7- integrations : [
8- // Add our Profiling integration
9- nodeProfilingIntegration ( ) ,
10- ] ,
5+ // Only initialize Sentry if not in test environment
6+ if ( process . env . NODE_ENV !== 'test' ) {
7+ Sentry . init ( {
8+ dsn : process . env . SENTRY_DSN ,
9+ integrations : [
10+ // Add our Profiling integration
11+ nodeProfilingIntegration ( ) ,
12+ ] ,
1113
12- // Add Tracing by setting tracesSampleRate
13- // We recommend adjusting this value in production
14- tracesSampleRate : 1.0 ,
14+ // Add Tracing by setting tracesSampleRate
15+ // We recommend adjusting this value in production
16+ tracesSampleRate : 1.0 ,
1517
16- // Set sampling rate for profiling
17- // This is relative to tracesSampleRate
18- profilesSampleRate : 1.0 ,
19- } ) ;
18+ // Set sampling rate for profiling
19+ // This is relative to tracesSampleRate
20+ profilesSampleRate : 1.0 ,
21+ } ) ;
22+ }
You can’t perform that action at this time.
0 commit comments