Reputation: 6987
I want to do some cleanup in our Kusto cluster that is full of functions that we have created and I know many of them are not being used (and I'm pretty sure they also don't work correctly). Is there a way to query when was the last time each one of the functions was used?
Upvotes: 2
Views: 900
Reputation: 1175
Your cluster holds a journal of last actions, including queries, dating 14 days back. You can access it using the ".show queries" command (in order to view queries run by other users, the command caller must be the relevant DB admin). Further filters can be applied on the ".show queries" output to zero in on the specific functions you are interested in (note - if you have function calling other functions, this investigation will become a little more tricky).
For example: .show queries | where Database == "" and Text has "" | summarize count(), max(StartedOn) by Principal
Upvotes: 3