Starting impl Sentry and tracing

This commit is contained in:
2026-06-09 20:58:38 +00:00
parent 3984a7d3ba
commit 39c2afa0a7
10 changed files with 1456 additions and 84 deletions
+1 -4
View File
@@ -1,5 +1,4 @@
use anyhow::anyhow;
use dotenvy::dotenv;
#[derive(Clone)]
pub struct EnvConfig {
@@ -15,8 +14,6 @@ pub struct EnvConfig {
}
pub fn load_config() -> anyhow::Result<EnvConfig> {
dotenv().ok();
let http_port = try_get_env("HTTP_PORT")?.parse()?;
let bot_name = try_get_env("BOT_NAME")?;
let webhook_secret = try_get_env("WEBHOOK_SIG_HEADER_SECRET")?;
@@ -40,7 +37,7 @@ pub fn load_config() -> anyhow::Result<EnvConfig> {
})
}
fn try_get_env(key: &str) -> anyhow::Result<String> {
pub fn try_get_env(key: &str) -> anyhow::Result<String> {
let env = std::env::var(key)?;
if env.trim().is_empty() {