Add info logs when atoms are written into statsd
Bug: 266193519
Test: atest MicrodroidHostTests#testTelemetryPushedAtoms
Change-Id: Ib866cd1743c4db9b75df2f58c8c5ae242db4ab88
diff --git a/virtualizationmanager/src/atom.rs b/virtualizationmanager/src/atom.rs
index 567fce9..02d46ec 100644
--- a/virtualizationmanager/src/atom.rs
+++ b/virtualizationmanager/src/atom.rs
@@ -32,7 +32,7 @@
};
use anyhow::{anyhow, Result};
use binder::ParcelFileDescriptor;
-use log::warn;
+use log::{info, warn};
use microdroid_payload_config::VmPayloadConfig;
use statslog_virtualization_rust::vm_creation_requested;
use std::thread;
@@ -149,6 +149,7 @@
apexes,
};
+ info!("Writing VmCreationRequested atom into statsd.");
thread::spawn(move || {
GLOBAL_SERVICE.atomVmCreationRequested(&atom).unwrap_or_else(|e| {
warn!("Failed to write VmCreationRequested atom: {e}");
@@ -172,9 +173,10 @@
elapsedTimeMillis: duration.as_millis() as i64,
};
+ info!("Writing VmBooted atom into statsd.");
thread::spawn(move || {
GLOBAL_SERVICE.atomVmBooted(&atom).unwrap_or_else(|e| {
- warn!("Failed to write VmCreationRequested atom: {e}");
+ warn!("Failed to write VmBooted atom: {e}");
});
});
}
@@ -204,6 +206,7 @@
exitSignal: exit_signal.unwrap_or_default(),
};
+ info!("Writing VmExited atom into statsd.");
thread::spawn(move || {
GLOBAL_SERVICE.atomVmExited(&atom).unwrap_or_else(|e| {
warn!("Failed to write VmExited atom: {e}");