feat(telemetry): report process memory and process and host uptime
This commit is contained in:
16 files changed
+311
-8
No files matched your search
@@ -37,3 +37,6 @@ url = "2"
|
||||
vt100 = { package = "wakey-vt100", path = "../vendor/vt100", registry = "gitea", version = "=0.16.2-wakey.2" }
|
||||
wakey = { path = "..", registry = "gitea", version = "0" }
|
||||
wakey-core = { path = "../wakey-core", registry = "gitea", version = "0", features = ["telemetry"] }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
wakey-linux = { path = "../wakey-linux", registry = "gitea", version = "0", features = ["telemetry"] }
|
||||
@@ -6,7 +6,7 @@ pub fn init(
|
||||
config: &TelemetryConfig,
|
||||
agent_id: Option<&str>,
|
||||
) -> Result<TelemetryGuard> {
|
||||
wakey_core::telemetry::init(
|
||||
let guard = wakey_core::telemetry::init(
|
||||
config,
|
||||
"wakey-agent",
|
||||
match verbose {
|
||||
@@ -15,5 +15,8 @@ pub fn init(
|
||||
_ => "wakey_agent=trace,wakey=debug,wakey_core=info,opentelemetry=warn",
|
||||
},
|
||||
agent_id,
|
||||
)
|
||||
)?;
|
||||
#[cfg(target_os = "linux")]
|
||||
let guard = guard.with_process_metrics(wakey_linux::telemetry::ProcfsProcessMetrics);
|
||||
Ok(guard)
|
||||
}
|
||||
Reference in new issue
Block a user