()
| 119 | } |
| 120 | |
| 121 | function scheduleFlush(): void { |
| 122 | if (flushTimer) return |
| 123 | |
| 124 | flushTimer = setTimeout(() => { |
| 125 | flushTimer = null |
| 126 | void flushLogs() |
| 127 | }, getFlushIntervalMs()).unref() |
| 128 | } |
| 129 | |
| 130 | export const initializeDatadog = memoize(async (): Promise<boolean> => { |
| 131 | if (isAnalyticsDisabled()) { |
no test coverage detected