aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorHazel Atkinson <yellowsink@riseup.net>2025-04-07 13:16:43 +0100
committerHazel Atkinson <yellowsink@riseup.net>2025-04-07 13:16:43 +0100
commit6793a51f4e5fe4a39f6640e651fc3f393cd5583a (patch)
treedee7cfddcf018c5d051c0e92c3b3d00eadf6e21b /src/config.rs
parent777376e4652c08e6dcd04f41faac44a36067e122 (diff)
downloadcontainerspy-6793a51f4e5fe4a39f6640e651fc3f393cd5583a.tar.gz
containerspy-6793a51f4e5fe4a39f6640e651fc3f393cd5583a.tar.bz2
containerspy-6793a51f4e5fe4a39f6640e651fc3f393cd5583a.zip
add export interval config
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs
index 153c170..52cb69c 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -14,11 +14,14 @@ pub struct CspyConfig {
#[config(env = "CSPY_OTLP_ENDPOINT")]
pub otlp_endpoint: Option<String>,
+
+ #[config(env = "CSPY_OTLP_INTERVAL")]
+ pub otlp_export_interval: Option<u64>,
}
pub static CONFIG: LazyLock<CspyConfig> = LazyLock::new(|| {
let cfg_loc = std::env::var("CSPY_CONFIG");
- let cfg_loc = cfg_loc.as_deref().ok().unwrap_or(&"/etc/containerspy/config.json");
+ let cfg_loc = cfg_loc.as_deref().ok().unwrap_or("/etc/containerspy/config.json");
CspyConfig::builder()
.env()