feat: submit batches to status backend

This commit is contained in:
2026-04-23 17:41:44 +08:00
parent b3bcc2af45
commit 3e2d7b36f2
4 changed files with 79 additions and 6 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import {
} from "../shared/auth-messages";
import { createBatchSubmitClient } from "../shared/batch-submit-client";
import { createBackendMetricsClient } from "../shared/backend-metrics-client";
import { DEFAULT_BATCH_SUBMIT_BASE_URL } from "../shared/batch-submit-config";
import { DEFAULT_BACKEND_METRICS_BASE_URL } from "../shared/backend-metrics-config";
import { isBackendMetricsSearchRequestMessage } from "../shared/backend-metrics-messages";
@@ -81,7 +82,7 @@ export function registerBackgroundMessageHandler(
authClient: createLogtoAuthClient()
});
submitBatch ??= createBatchSubmitClient({
baseUrl: "http://127.0.0.1:4319",
baseUrl: DEFAULT_BATCH_SUBMIT_BASE_URL,
getAccessToken: () => authController!.getAccessToken(),
sendMessage: () =>
Promise.reject(new Error("background batch submit does not use sendMessage"))