refactor(config): add independent toggles for enabling traces and metrics (#1020)

This commit is contained in:
Sanchith Hegde
2023-05-03 12:15:03 +05:30
committed by GitHub
parent 0df2244794
commit af71828e35
14 changed files with 72 additions and 68 deletions

View File

@ -1,5 +1,4 @@
use drainer::{errors, errors::DrainerResult, logger::logger, services, settings, start_drainer};
use error_stack::ResultExt;
use drainer::{errors::DrainerResult, logger::logger, services, settings, start_drainer};
#[tokio::main]
async fn main() -> DrainerResult<()> {
@ -21,7 +20,7 @@ async fn main() -> DrainerResult<()> {
let shutdown_intervals = conf.drainer.shutdown_interval;
let loop_interval = conf.drainer.loop_interval;
let _guard = logger::setup(&conf.log).change_context(errors::DrainerError::MetricsError)?;
let _guard = logger::setup(&conf.log);
logger::info!("Drainer started [{:?}] [{:?}]", conf.drainer, conf.log);