Add module probes and worker telemetry
This commit is contained in:
@@ -6,6 +6,7 @@ export type OpsCheck = {
|
||||
state: "ok" | "warning" | "error" | string;
|
||||
detail: string;
|
||||
readiness_critical?: boolean;
|
||||
metrics?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type OpsDeploymentProfile = {
|
||||
@@ -52,6 +53,15 @@ export type OpsStatus = {
|
||||
};
|
||||
database_url: string;
|
||||
file_storage_backend: string;
|
||||
worker_metrics: {
|
||||
workers?: number;
|
||||
active_tasks?: number;
|
||||
expected_queues?: string[];
|
||||
active_queues?: string[];
|
||||
missing_queues?: string[];
|
||||
queue_depths?: Record<string, number>;
|
||||
};
|
||||
operational_probe_count: number;
|
||||
};
|
||||
readiness: {
|
||||
ready: boolean;
|
||||
@@ -85,3 +95,7 @@ export type OpsStatus = {
|
||||
export function fetchOpsStatus(settings: ApiSettings): Promise<OpsStatus> {
|
||||
return apiFetch(settings, "/api/v1/ops/status");
|
||||
}
|
||||
|
||||
export function runOpsChecks(settings: ApiSettings): Promise<OpsStatus> {
|
||||
return apiFetch(settings, "/api/v1/ops/checks/run", { method: "POST" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user