How to permanently delete Azure functions logs

kanna 106 Reputation points
2022-03-13T14:31:19.887+00:00

I have azure functions that have logging enabled. I can see them from monitor
How can I delete them permanently from portal.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,679 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Manu Philip 17,671 Reputation points MVP
    2022-03-13T18:34:04.577+00:00

    I think, you can POST a purge request through the API described here: purge

    ----------

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  2. MughundhanRaveendran-MSFT 12,456 Reputation points
    2022-03-14T09:52:26.29+00:00

    @kanna ,

    Thanks for posting your question in Q&A.

    The logs that are seen in the monitor section are the function invocation logs and the source of these logs are from the Application insights logs. The following are the ways to delete the logs

    1. Delete the Application insights instance ( Just an option but it is not recommended as you will lose all the data/logs associated with this instance)
    2. Change the data retention period. Please refer : https://learn.microsoft.com/en-us/azure/azure-monitor/logs/manage-cost-storage#change-the-data-retention-period
    3. Purge data using Rest API : https://learn.microsoft.com/en-us/rest/api/application-insights/components/purge

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.