diff --git a/src/config.rs b/src/config.rs index 0b070ea..5ee5b83 100644 --- a/src/config.rs +++ b/src/config.rs @@ -352,13 +352,11 @@ impl Config { } } - fn get_host_tag() -> String { - if let Ok(val) = env::var("SQMA_OBSERVABILITY_HOST_TAG") { - if !val.is_empty() { - return val; - } - } + fn get_bool(env_key: &str, uci_key: &str, default: Option) -> Result { + Self::get::(env_key, uci_key, default.map(FlexiBool)).map(|f| f.0) + } + fn get_host_tag() -> String { // rustix can give us the hostname without shelling out rustix::system::uname() .nodename()