alamb commented on issue #17207: URL: https://github.com/apache/datafusion/issues/17207#issuecomment-3207986084
> The easier of the two items to address is providing access to the instrumented object store(s) for each statement execution. Unfortunately, [ObjectStore](https://docs.rs/object_store/0.12.3/object_store/trait.ObjectStore.html#) I think what we could do is something like this: ```rust /// Shared state that will print struct RequestObserver { // should we print the requests we see print_requeset: AtomicBool, } /// ObjectStore wrapper struct InstrumentedObjectStore { // shared observer state observer: Arc<RequestObserver>, // wrapped real object store inner: Arc<dyn ObjectStore> } impl ObjectStore for InstrumentedObjectStore { // call through to the inner object store, reporting results to the observer if enabled async fn get(&self, args) -> ... { if self.observer.print_request { // gather information about the erquest } // call into the actual implementation self.inner.get(args).await } ... } ``` I can try to setup the scaffolding if that would help -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org