Niels Filter
Niels Filter

Reputation: 4528

Delete specific Application Insights events on Azure

Is there a way to delete only specific Application Insight custom events from Azure? (via portal or powershell)

If at all possible I'd love to avoid :

Upvotes: 1

Views: 3409

Answers (3)

kunal
kunal

Reputation: 476

You can delete specific custom events from application insights using Purge API. You need to know the table from which you plan to delete specific data collected and time stamp. Refer for more details - https://sanganakauthority.blogspot.com/2019/06/how-to-delete-or-purge-azure.html

Upvotes: 0

John Gardner
John Gardner

Reputation: 25146

There is a way to delete data, intended for GDPR type purposes. It is not intended to be a general delete mechanism and has many restrictions in how it works and how often you can delete.

see https://learn.microsoft.com/en-us/azure/azure-monitor/platform/personal-data-mgmt

We have made available as part of a privacy handling a purge API path. This path should be used sparingly due to the risk associated with doing so, the potential performance impact, and the potential to skew all-up aggregations, measurements, and other aspects of your Log Analytics data. See the Strategy for personal data handling section for alternative approaches to handle private data. Purge is a highly privileged operation that no app or user in Azure (including even the resource owner) will have permissions to execute without explicitly being granted a role in Azure Resource Manager. This role is Data Purger and should be cautiously delegated due to the potential for data loss.

and

While the vast majority of purge operations may complete much quicker than the SLA, due to their heavy impact on the data platform used by Application Insights, the formal SLA for the completion of purge operations is set at 30 days.

see https://learn.microsoft.com/en-us/rest/api/application-insights/components/purge for the details of deleting specific data.

Upvotes: 2

John Gardner
John Gardner

Reputation: 25146

No, there is no way to delete data at this time, but the raw data will be inaccessable after ~7 days. Aggregated data used for charts will live on for longer than that, though.

For development/debugging, i'd suggest setting your instrumentation key to a different component so that you don't pollute production data with developer data.

There's a related question about how to do that here: Azure Websites Application Insights - switching config

Upvotes: 0

Related Questions