pinot icon indicating copy to clipboard operation
pinot copied to clipboard

[Discussion] Event listener to gather query stats/information

Open dharakk opened this issue 5 years ago • 3 comments

Hi, We have been looking into doing query analysis in order to pin point a specific scenario and combing through server and broker logs is a difficult task. An event listener interface which enable us to add a hook into query execution and gather query info/stats would be really helpful. For example Presto provides the following interface to hook into query execution. https://github.com/prestodb/presto/blob/master/presto-spi/src/main/java/com/facebook/presto/spi/eventlistener/EventListener.java

Do we already have a similar mechanism in Pinot? Have we ever considered doing so as I can imagine it wont be as simple as Presto because of the query volume and latency sensitive nature of Pinot?

dharakk avatar Sep 02 '21 19:09 dharakk

Yes, see https://github.com/apache/pinot/blob/master/pinot-broker/src/main/java/org/apache/pinot/broker/api/RequestStatistics.java

You will need to plug in your own mechanism to emit this from the broker

mcvsubbu avatar Sep 05 '21 18:09 mcvsubbu

Good idea. As Subbu mentioned, we have all the information but we lack the listener interface. It's definitely worth adding one in our spi.

kishoreg avatar Sep 05 '21 18:09 kishoreg

Just saw this today. This was closed by #10606.

ankitsultana avatar Jun 11 '25 15:06 ankitsultana