chore(o11y): add more debug logs to daemon & runtime (#318)

This change adds debug log lines to make it easier to tell where issues
are occuring during startup.
This commit is contained in:
Khionu Sybiern
2024-08-08 12:11:51 -07:00
committed by GitHub
parent b7d41ee9f4
commit 6bf3741ec9
5 changed files with 54 additions and 11 deletions

View File

@ -11,7 +11,7 @@ use krata::idm::{
transport::IdmTransportPacket,
};
use kratart::channel::ChannelService;
use log::{error, warn};
use log::{debug, error, warn};
use prost::Message;
use tokio::{
select,
@ -85,13 +85,18 @@ pub struct DaemonIdm {
impl DaemonIdm {
pub async fn new(glt: ZoneLookupTable) -> Result<DaemonIdm> {
debug!("allocating channel for IDM");
let (service, tx_raw_sender, rx_receiver) =
ChannelService::new("krata-channel".to_string(), None).await?;
let (tx_sender, tx_receiver) = channel(100);
let (snoop_sender, _) = broadcast::channel(100);
debug!("starting channel service");
let task = service.launch().await?;
let clients = Arc::new(Mutex::new(HashMap::new()));
let feeds = Arc::new(Mutex::new(HashMap::new()));
Ok(DaemonIdm {
glt,
rx_receiver,