Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
fix: use boolean to parse sentry config enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwwinter committed Feb 29, 2024
1 parent 55cdc74 commit 05d32f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OPENID_CONFIGURATION: http://localhost:8080/realms/dummy-realm/.well-known/openi
# values can be overwritten in .env file

SENTRY:
ENABLED: false
ENABLED: true
INSTANCE_NAME: local-development # can be personalised in .env -> local-development-<your-name>
ENVIRONMENT: local # local | development | production
DSN: ''
4 changes: 2 additions & 2 deletions src/sentry.configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArgumentsHost, INestApplication } from '@nestjs/common';
import { BaseExceptionFilter, HttpAdapterHost } from '@nestjs/core';

export class SentryConfiguration {
ENABLED = '';
ENABLED: boolean = false;
DSN = '';
INSTANCE_NAME = '';
ENVIRONMENT = '';
Expand All @@ -26,7 +26,7 @@ export function configureSentry(
configService: ConfigService,
): void {
const sentryConfiguration = loadSentryConfiguration(configService);
if (sentryConfiguration.ENABLED === 'true') {
if (sentryConfiguration.ENABLED) {
configureLoggingSentry(app, sentryConfiguration);
}
}
Expand Down

0 comments on commit 05d32f9

Please sign in to comment.