I recently found out someone accidentally overwrote one of my Kusto queries in Azure Application Insights. Is there a way to revert a query to a previously saved version of it? Or do I really have no other choice but to rewrite the query?
The query is a Legacy Query in the Other Category under Queries in the Azure Logs. I cannot show much more, since this is work related.
After a workaround on your issue, I found that there is no default feature in Azure workspace for reverting a query to a previously saved version of it.
Below are the few workarounds you can look into.
application insights >> logs
in the portal, you can be able to view the history of the queries which shows you the query ran in the past.Save the query before any conflict or issue happens. Because when you save a query, it will gets automatically stored in a query pack which will not get deleted until you delete it. Refer
Alternatively, you can use restore data management to retrieve the activities done in the past with the help of an API or a CLI command az monitor log-analytics workspace table restore
.
Refer MSDoc for more relevant information.