feat(ml-service): add Prometheus metrics and request telemetry instrumentation

This commit is contained in:
MythEclipse
2026-06-07 18:12:32 +07:00
parent ede1c480be
commit eefb16ad1d
6 changed files with 346 additions and 17 deletions
+4
View File
@@ -3,6 +3,7 @@ mod error;
mod image;
mod model;
mod routes;
mod telemetry;
use anyhow::Result;
use config::Config;
@@ -32,6 +33,9 @@ async fn main() -> Result<()> {
"Model service initialized"
);
// Set model load status metric
telemetry::model_load_status().set(if model.is_loaded() { 1.0 } else { 0.0 });
// Create AppState
let state = AppState { model };