bert-beyondloops opened a new issue, #21146:
URL: https://github.com/apache/datafusion/issues/21146

   ### Is your feature request related to a problem or challenge?
   
   There is currently no way to programmatically inspect the memory consumption 
of individual consumers tracked by TrackConsumersPool. The only available 
method, report_top(), returns a formatted string intended for  human-readable 
output, making it unsuitable for programmatic use (e.g., metrics collection, 
monitoring, or custom reporting).         
   
   ### Describe the solution you'd like
   
   Add a metrics() method to TrackConsumersPool that returns a 
Vec<MemoryConsumerMetrics> — a snapshot of all currently tracked consumers. 
Each MemoryConsumerMetrics entry exposes:
   
     - name — the consumer's name
     - can_spill — whether the consumer supports spilling to disk
     - reserved — current bytes reserved
     - peak — peak bytes reserved
   
     This allows callers to inspect memory usage programmatically without 
parsing formatted strings.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   This is useful for embedding DataFusion in systems that want to expose 
per-operator memory metrics through their own observability pipelines (e.g., 
Prometheus, OpenTelemetry or custom dashboards).


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to