Skip to content

Commit

Permalink
fix: add environment to sentry configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed May 19, 2021
1 parent e3ce123 commit cd145fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {parseLogLevel} from "../api/util/util";

export interface Config {
sentryDsn: string | undefined;
environment: string;
production: boolean;
logLevel: LogLevel;
testing: boolean;
Expand All @@ -20,6 +21,7 @@ export interface Config {

export const config: Config = {
sentryDsn: environment.SENTRY_DSN,
environment: environment.NODE_ENV,
production: environment.NODE_ENV != null && environment.NODE_ENV.toLowerCase() === "production",
testing: booleanize(environment.TESTING),
logLevel: parseLogLevel(environment.LOG_LEVEL) ?? "info",
Expand Down
1 change: 1 addition & 0 deletions src/service/metrics/sentry-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class SentryService implements IMetricsService {

init({
dsn: this.config.sentryDsn,
environment: this.config.environment,
integrations: [
// enable HTTP calls tracing
new Integrations.Http({tracing: true}),
Expand Down

0 comments on commit cd145fc

Please sign in to comment.