Skip to content

Commit

Permalink
refactor: improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
okan-cakmak committed Feb 29, 2024
1 parent 51a18b2 commit e007c5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/server/adapters/logger/errorTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface ErrorTracker {
captureError: (error: ServerError, extra: Extra) => void;
flush: () => Promise<void> ;
close: (timeout?: number) => Promise<boolean>;
SENTRY_CLOSE_TIMEOUT?: number;
CLOSE_TIMEOUT?: number;
}

const getSentry = ({ sentryDSN, environment, version }: SentryGetParams): ErrorTracker => {
Expand Down Expand Up @@ -82,7 +82,7 @@ const getSentry = ({ sentryDSN, environment, version }: SentryGetParams): ErrorT
await flush();
},
close,
SENTRY_CLOSE_TIMEOUT: 2000
CLOSE_TIMEOUT: 2000
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/server/adapters/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Logger {
}

async close(): Promise<void> {
await this.errorTracker?.close(this.errorTracker.SENTRY_CLOSE_TIMEOUT).then(result => {
await this.errorTracker?.close(this.errorTracker.CLOSE_TIMEOUT).then(result => {
if (!result) {
this.logProvider.error(
"Sentry could not be flushed, some error events may have been lost.",
Expand Down

0 comments on commit e007c5c

Please sign in to comment.