Skip to content

Commit

Permalink
feat: remove sentry integration (fixes #52)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 10, 2023
1 parent 4a398dc commit 1b5dcc4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 204 deletions.
203 changes: 8 additions & 195 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
]
},
"dependencies": {
"@sentry/node": "^6.16.1",
"delay": "^5.0.0",
"fastify": "^4.10.2",
"roarr": "^7.14.0",
Expand Down
11 changes: 3 additions & 8 deletions src/factories/createLightship.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import {
EventEmitter,
} from 'events';
import {
captureException,
} from '@sentry/node';
import delay from 'delay';
import createFastify from 'fastify';
import {
Expand Down Expand Up @@ -118,11 +115,9 @@ export default async (userConfiguration?: ConfigurationInput): Promise<Lightship
});

app.addHook('onError', (request, reply, error, done) => {
// Only send Sentry errors when not in development
// eslint-disable-next-line node/no-process-env
if (process.env.NODE_ENV !== 'development') {
captureException(error);
}
log.error({
error: serializeError(error),
}, 'lightship error');

done();
});
Expand Down

0 comments on commit 1b5dcc4

Please sign in to comment.