Skip to content

Commit

Permalink
chore(api): Remove Sentry profiling from all apps (#6660)
Browse files Browse the repository at this point in the history
  • Loading branch information
SokratisVidros authored Oct 9, 2024
1 parent 14c5c23 commit 920bb75
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 77 deletions.
21 changes: 4 additions & 17 deletions apps/api/src/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { init } from '@sentry/nestjs';
import { version } from '../package.json';

if (process.env.SENTRY_DSN) {
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,
environment: process.env.NODE_ENV,
release: `v${version}`,
ignoreErrors: ['Non-Error exception captured'],
});
}
21 changes: 2 additions & 19 deletions apps/inbound-mail/src/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
import { init } from '@sentry/nestjs';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import version from '../package.json';
import { version } from '../package.json';

if (process.env.SENTRY_DSN) {
init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
// eslint-disable-next-line @typescript-eslint/no-base-to-string
release: `v${version}`,
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,
ignoreErrors: ['Non-Error exception captured'],
});
}
24 changes: 4 additions & 20 deletions apps/webhook/src/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
import { init } from '@sentry/node';
import packageJson from '../package.json';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { init } from '@sentry/nestjs';
import { version } from '../package.json';

if (process.env.SENTRY_DSN) {
init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
release: `v${packageJson.version}`,
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,
release: `v${version}`,
ignoreErrors: ['Non-Error exception captured'],
});
}
6 changes: 2 additions & 4 deletions apps/worker/src/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { init } from '@sentry/nestjs';
import packageJson from '../package.json';
import { version } from '../package.json';

if (process.env.SENTRY_DSN) {
init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
release: `v${packageJson.version}`,
release: `v${version}`,
ignoreErrors: ['Non-Error exception captured'],
integrations: [nodeProfilingIntegration()],
});
}
18 changes: 1 addition & 17 deletions apps/ws/src/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
import { init } from '@sentry/nestjs';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { version } from '../package.json';

if (process.env.SENTRY_DSN) {
init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV,
release: `v${version}`,
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,
ignoreErrors: ['Non-Error exception captured'],
});
}

0 comments on commit 920bb75

Please sign in to comment.