Skip to content

Add and expose metrics in ObjectStore Trait #3019

Open

Description

@mingmwang

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)

The current ObjectStore Trait and implementations do not collect and expose any metrics.
Add some metrics like read/write/delete ops counts, scan bytes, elapse times etc and expose them will be very useful
in the production environment.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

  1. alamb commented on Aug 3, 2022

    @alamb
    Contributor

    One way to do this might be to implement a wrapper around an inner Arc<dyn ObjectStore> interface that had metrics.

    Much like https://github.com/apache/arrow-rs/blob/master/object_store/src/limit.rs or https://github.com/apache/arrow-rs/blob/master/object_store/src/throttle.rs

    BTW I plan to release a new object_store release (from arrow-rs) mid next week

    Something like

    struct TracingObjectStore {
      inner: Arc<dyn ObjectStore>
    }
    
    impl ObjectStore for TracingObjectStore { 
     fn get(&self) { 
       // add whatever tracing is needed
       self.inner.get()
      }
    ...
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions