Search code examples
azureazure-application-insightsazure-log-analyticsazure-log-analytics-workspace

How to increase retention period for a custom metric/event in an Azure Application Insights?


I am trying to understand if it is possible to increase retention period for a custom metric/event in an Azure Application Insights?

I want to send my own custom events to an existing Application Insights instance (or perhaps to log analytics workspace directly), and I want to store these metrics for as long as possible, for example 2 years.

I know by default App Insights has a data retention of 30/90 days, and I don't want to change it for all of Application Insights, but just for this new custom metric I am sending is there a way to increase the data retention period?

My Application Insights is using log analytics workspace, and I can see underlying tables have possibility to change their retention period, but I don't understand the connection between my custom events and these tables.


Solution

  • I don't see any option to increase the retention period of any particular metric or any event.

    • AFAIK,Application Insights only supports to change the retention period for the complete Application Insights.

    I can see underlying tables have possibility to change their retention period, but I don't understand the connection between my custom events and these tables.

    The CustomEvents table in Application Insights can be seen as AppEvents table in Log Analytics Workspace.

    • It is the same table of your Custom Events/Telemetry.

    ApplicationInsights:

    enter image description here

    Log Analytics Workspace:

    enter image description here

    • So, you can set the retention for the AppEvents table.

    enter image description here