aho135 commented on PR #18731: URL: https://github.com/apache/druid/pull/18731#issuecomment-3577986962
> Hi @aho135 > > Thanks for the review! I also find that it will be very helpful to emit metrics for each query, so we know which query will take up alot of resources. In our version of Druid, we simply appended each of the `PerQueryStat` to the `statsMap` in `QueryLifecycle#emitLogsAndMetrics`, but I feel its quite a hacky way of doing it. `sqlQueryId` as a dimension in the GroupByStatsMonitor will definitely help. > > Alternatively, we can look into migrating the groupBy query metrics in `GroupByStatsMonitor` to `GroupByQueryMetrics`, which should emit metrics for each GroupBy query. In that way, this can make the `MAX` and `SUM` metrics redundant as we can now emit metrics for each query. > > We can do more of this in a seperate PR. Sounds good @GWphua I was thinking on very similar lines to emit these from `GroupByQueryMetrics` I have a first draft on this: https://github.com/aho135/druid/commit/9f8209149221be0ff6714dc4faa1c10e6e92274e Lmk if you have any thoughts on this. Thanks! -- 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]
