feat: implement comprehensive retry mechanism and improve observability

Add retry tracking to scrape jobs with configurable max retries (default 5), implement
automatic database migrations on startup, and significantly reduce logging noise from
infrastructure layers. Enhanced tracing with structured spans for better debugging while
keeping output readable by suppressing verbose trace logs from rate limiters and session
management. Improved error handling with detailed retry context and proper session cookie
validation.
This commit is contained in:
Ryan Walters
2025-11-03 10:18:07 -06:00
parent b1ed2434f8
commit 51f8256e61
12 changed files with 248 additions and 127 deletions
+8
View File
@@ -62,6 +62,14 @@ impl App {
"database pool established"
);
// Run database migrations
info!("Running database migrations...");
sqlx::migrate!("./migrations")
.run(&db_pool)
.await
.expect("Failed to run database migrations");
info!("Database migrations completed successfully");
// Create BannerApi and AppState
let banner_api = BannerApi::new_with_config(
config.banner_base_url.clone(),