diff --git a/zebrad/src/components/tracing/component.rs b/zebrad/src/components/tracing/component.rs index 0d0e56a3..491dba73 100644 --- a/zebrad/src/components/tracing/component.rs +++ b/zebrad/src/components/tracing/component.rs @@ -55,7 +55,7 @@ impl Tracing { /// Reload the currently-active filter with the supplied value. /// /// This can be used to provide a dynamic tracing filter endpoint. - pub fn reload_filter(&mut self, filter: impl Into) { + pub fn reload_filter(&self, filter: impl Into) { self.filter_handle .reload(filter) .expect("the subscriber is not dropped before the component is"); diff --git a/zebrad/src/components/tracing/endpoint.rs b/zebrad/src/components/tracing/endpoint.rs index b406cacf..353bd0ba 100644 --- a/zebrad/src/components/tracing/endpoint.rs +++ b/zebrad/src/components/tracing/endpoint.rs @@ -104,10 +104,10 @@ To set the filter, POST the new filter string to /filter: .expect("response with known status code cannot fail"), (&Method::POST, "/filter") => match read_filter(req).await { Ok(filter) => { - app_writer() - .state_mut() + app_reader() + .state() .components - .get_downcast_mut::() + .get_downcast_ref::() .expect("Tracing component should be available") .reload_filter(filter);