()
| 102 | let datadogInitialized: boolean | null = null |
| 103 | |
| 104 | function getDatadogConfig(): DatadogConfig | null { |
| 105 | const endpoint = process.env.NCODE_DATADOG_LOGS_ENDPOINT?.trim() |
| 106 | const token = process.env.NCODE_DATADOG_CLIENT_TOKEN?.trim() |
| 107 | |
| 108 | if (!endpoint || !token) { |
| 109 | return null |
| 110 | } |
| 111 | |
| 112 | return { endpoint, token } |
| 113 | } |
| 114 | |
| 115 | async function flushLogs(): Promise<void> { |
| 116 | if (logBatch.length === 0) return |
no outgoing calls
no test coverage detected