perf(console): decouple invocation telemetry writes

Move Axum management and gateway adapters into a dedicated module while preserving the existing public routers and response contracts.

Replace per-invocation full snapshots with a bounded asynchronous writer that batches metric deltas and events. Serialize it with control snapshots, flush before lifecycle persistence and graceful shutdown, and keep invocation results independent from telemetry failures.

Enable the Runtime compilation cache beside the Console artifact directory and verify metric recovery across a lifecycle flush.
This commit is contained in:
Maofeng
2026-07-30 07:18:25 +08:00
parent 53a8c6b690
commit 68218b2eae
6 changed files with 887 additions and 674 deletions
+7
View File
@@ -408,6 +408,7 @@ async fn reloads_manifests_without_restoring_actor_memory() {
assert_eq!(response.status(), StatusCode::OK);
let response = application
.clone()
.oneshot(json_request(
"/api/v1/services/persisted/0.1.0/invoke",
json!({ "input_base64": BASE64.encode(b"persist metrics") }),
@@ -415,6 +416,12 @@ async fn reloads_manifests_without_restoring_actor_memory() {
.await
.expect("invoke request should complete");
assert_eq!(response.status(), StatusCode::OK);
let response = application
.oneshot(empty_post("/api/v1/services/persisted/0.1.0/stop"))
.await
.expect("stop request should flush control state");
assert_eq!(response.status(), StatusCode::OK);
}
let application = test_app(artifact_dir.path()).await;