Deprecated classic application insights
We have task to migrate to new Application Insights because of deprecation of classic version of the Application Insights. Notification from Azure Portal:
Classic Application Insights is deprecated and will be retired in February 2024
This is already covered in #258 (closed) merged in !838 (merged)
To migrate Application Insights to we need to set parameter 'worspace_id' to the id of our current Log Analytic WS in TF. In our current version of azurerm provider (3.39) if we change 'worspace_id' parameter terraform will recreate Application Insights. In case of Application Insights recreation we will lose data.
One possible solution of how to omit recreation of application insights - is to upgrade azurerm version to at least 3.49.0
Also we have task to change instrumentation key to connection string. Reason:
On March 31, 2025, support for instrumentation key ingestion will end. Instrumentation key ingestion will continue to work, but we'll no longer provide updates or support for the feature. Transition to connection strings
We need to start thinking about using managed identities to be able to connect to the workspace id. - Not recommended as of today and will use connection strings.
Related issues and MR: #316 (closed) !890 (merged) - already implemented as secret
To change instrumentation key to connection string we need add secret for connection string, update log analytics workspace data retention days to 90 (to meet the application insights data retention), increase log analytics workspace daily cap (current log + ai daily cap) environment variable, switch logging in services to use connection string from instrumentation key.
I think the above it is not hard requirement, and can be parametrized. I would suggest to include this fix in this issue.
Action items for this issue:
- Upgrade AzureRM and other potential terraform providers.
- Parametrize app insights.
Covered in !913 (merged)