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

@ -6,7 +6,7 @@ use std::{
use lru_cache::LruCache;
use tokio::sync::{broadcast, Mutex, RwLock};
use crate::{Config, Result};
use crate::{observability::FilterReloadHandles, Config, Result};
pub(crate) mod account_data;
pub(crate) mod admin;
@ -54,6 +54,7 @@ impl Services {
>(
db: &'static D,
config: Config,
reload_handles: FilterReloadHandles,
) -> Result<Self> {
Ok(Self {
appservice: appservice::Service::build(db)?,
@ -149,7 +150,7 @@ impl Services {
},
sending: sending::Service::build(db, &config),
globals: globals::Service::load(db, config)?,
globals: globals::Service::load(db, config, reload_handles)?,
})
}