diff --git a/src/base-command.ts b/src/base-command.ts index f8275f924..c5d01a3c4 100644 --- a/src/base-command.ts +++ b/src/base-command.ts @@ -7,11 +7,11 @@ import AppService from './app-config/service'; import { prettyValidationErrors } from './common/dependency-manager/validation'; import LoginRequiredError from './common/errors/login-required'; import { isBooleanStringFlag } from './common/utils/oclif'; -// import SentryService from './sentry'; +import SentryService from './sentry'; export default abstract class BaseCommand extends Command { app: AppService; - // sentry: SentryService; + sentry: SentryService; async auth_required(): Promise { return true; @@ -20,7 +20,7 @@ export default abstract class BaseCommand extends Command { constructor(argv: string[], config: Config) { super(argv, config); this.app = AppService.create(this.config.configDir, this.config.userAgent.split(/\/|\s/g)[2]); - // this.sentry = new SentryService(this); + this.sentry = new SentryService(this); } // override debug being a protected method on the oclif Command class @@ -110,7 +110,7 @@ export default abstract class BaseCommand extends Command { async finally(err?: Error): Promise { try { - // await this.sentry.endSentryTransaction(err); + await this.sentry.endSentryTransaction(err); this.app.posthog.capture({ event: 'cli.command.complete', diff --git a/src/sentry.ts b/src/sentry.ts index 7ff5496d0..40701ab2a 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -35,7 +35,7 @@ export default class SentryService { Sentry.init({ enabled: process.env.TEST !== '1' && process.env.NODE_ENV !== 'development' && process.env.NODE_ENV !== ENVIRONMENT.PREVIEW, dsn: CLI_SENTRY_DSN, - debug: false, + debug: true, // TODO: restore: false environment: process.env?.NODE_ENV ?? 'production', release: process.env?.npm_package_version, tracesSampleRate: 1.0,