mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Improve comments for Sentry client setup
This commit is contained in:
parent
a75615707b
commit
09f4fc9b9d
2 changed files with 6 additions and 0 deletions
|
|
@ -15,6 +15,10 @@ const SENTRY_DSN = process.env.SERVER_SENTRY_DSN;
|
|||
*/
|
||||
exports.setup = () => {
|
||||
if (SENTRY_DSN) {
|
||||
// Configure the Sentry client. As is, this catches unhandled
|
||||
// exceptions from starting the server etc. but does not catch the
|
||||
// ones thrown from Express.js middleware functions. For those
|
||||
// an error handler has to be added to the Express app.
|
||||
Raven.config(SENTRY_DSN, {
|
||||
environment: ENV,
|
||||
autoBreadcrumbs: {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import config from '../config';
|
|||
*/
|
||||
export const setup = () => {
|
||||
if (config.sentryDsn !== undefined) {
|
||||
// Configures the Sentry client. Adds a handler for
|
||||
// any uncaught exception.
|
||||
Raven.config(config.sentryDsn, { environment: config.env }).install();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue