feat: guest metrics support (#46)

* feat: initial support for idm send in daemon

* feat: implement IdmClient backend support

* feat: daemon idm now uses IdmClient

* fix: implement channel destruction propagation

* feat: implement request response idm system

* feat: implement metrics support

* proto: move metrics into GuestMetrics for reusability

* fix: log level of guest agent was trace

* feat: metrics tree with process information
This commit is contained in:
Alex Zenla
2024-04-12 00:34:46 -07:00
committed by GitHub
parent ec9060d872
commit 5e16f3149f
27 changed files with 1211 additions and 278 deletions

View File

@ -15,7 +15,6 @@ use xenstore::{XsdClient, XsdInterface};
use self::{
autoloop::AutoLoop,
console::XenConsole,
launch::{GuestLaunchRequest, GuestLauncher},
};
use krataoci::cache::ImageCache;
@ -23,7 +22,6 @@ use krataoci::cache::ImageCache;
pub mod autoloop;
pub mod cfgblk;
pub mod channel;
pub mod console;
pub mod launch;
pub struct GuestLoopInfo {
@ -321,17 +319,6 @@ impl Runtime {
Ok(uuid)
}
pub async fn console(&self, uuid: Uuid) -> Result<XenConsole> {
let info = self
.context
.resolve(uuid)
.await?
.ok_or_else(|| anyhow!("unable to resolve guest: {}", uuid))?;
let domid = info.domid;
let tty = self.context.xen.get_console_path(domid).await?;
XenConsole::new(&tty).await
}
pub async fn list(&self) -> Result<Vec<GuestInfo>> {
self.context.list().await
}