Allow tracing filters to be changed at runtime

ReloadHandle is taken from conduwuit commit
8a5599adf9eafe9111f3d1597f8fb333b8b76849, authored by Benjamin.

Co-authored-by: Benjamin Lee <benjamin@computer.surgery>
This commit is contained in:
Lambda 2024-06-07 16:45:52 +00:00 committed by Charles Hall
parent f576aff7eb
commit f89e1c7dfc
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
7 changed files with 145 additions and 29 deletions

View file

@ -112,7 +112,7 @@ async fn try_main() -> Result<(), error::Main> {
let config = config::load(args.config.as_ref()).await?;
let _guard = observability::init(&config)?;
let (_guard, reload_handles) = observability::init(&config)?;
// This is needed for opening lots of file descriptors, which tends to
// happen more often when using RocksDB and making lots of federation
@ -126,7 +126,7 @@ async fn try_main() -> Result<(), error::Main> {
.expect("should be able to increase the soft limit to the hard limit");
info!("Loading database");
KeyValueDatabase::load_or_create(config)
KeyValueDatabase::load_or_create(config, reload_handles)
.await
.map_err(Error::DatabaseError)?;