waynr opened a new issue, #7135: URL: https://github.com/apache/arrow-rs/issues/7135
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> In https://github.com/influxdata/influxdb/issues/25911, we are discussing ways to can record [`trace` spans](https://github.com/influxdata/influxdb3_core/tree/main/trace) that distinguish between two key code paths in an implementation of `ObjectStore` that either retrieves objects from an object store or from a local in-memory cache. The problem we have right now is that our `ObjectStore` implementation has no way to receive span info passed in from the calling context. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> This issue is proposing the following: * Add a new `Session` trait to the `object_store` crate [similar to what exists in the `datafusion::catalog`](https://docs.rs/datafusion/latest/datafusion/catalog/trait.Session.html) * This would have a single method that returns a session config similar to `datafusion::prelude::SessionConfig` * This session config would have similar `set_extension`, `with_extension`, and `get_extension` methods that allow storing and retrieving `Arc<dyn Any + Send + Sync + 'static>` instances by type ID * Add a new set of methods to the `ObjectStore` trait take `&dyn Session` as a parameter * eg `fn get_with_session(&self, session: &dyn Session, location: &Path)` * these methods could have default impls that delegate to the corresponding existing method (eg `get_with_session` would just ignore the session parameter and call `get` by default This would allow me to do some refactoring in https://github.com/influxdata/influxdb/ and https://github.com/influxdata/influxdb3_core/ that would result in passing a `&dyn Session` with a properly-parented child span and a custom `*_with_session` defined in [impl ObjectStore for MemCachedObjectStore](https://github.com/influxdata/influxdb/blob/8daccb7ee8f82ffae99b25236af9645fd60e448b/influxdb3_cache/src/parquet_cache/mod.rs#L668) -- resulting in trace spans properly contextualized in the hierarchy of a given query which also differentiate between calls that result in cached vs object store parquet file retrieval. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> I've considered: * Using simple metrics to capture the high-level (ie not contextualized within a trace span hierarchy) difference between object store and cached parquet file retrievals. * Doesn't help us identify when poor query performance is caused by cache misses * Setting up `MemcachedObjectStore` with its own root hierarchy of spans * Also doesn't help us identify when poor query performance is caused by cache misses **Additional context** <!-- Add any other context or screenshots about the feature request here. --> -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
