I have my Spring Boot application hosted via Azure App Service with Azure CLI scripts. Also I deployed Azure Application Insights on the same subscription with Azure CLI scripts. My next step is to connect App Insights with App Service using only az
commands and supplementary files.
I have gone through this documentation on how to connect App Insights codeless way. But it appeared I was still lacking a lot of metrics like requests, dependencies, exceptions and etc (although I have micrometrics in the classpath). Application Insights | Search only had traces, so I tried to connect it from Azure Portal and it worked. This integration restarted my application and did some magic I don't know about:
Here is an image of before I connected App Insights from Azure Portal and after:
Looking into the configuration of the App Service I saw several new values which were NOT described in the documentation:
{
"XDT_MicrosoftApplicationInsights_PreemptSdk": "disabled",
"XDT_MicrosoftApplicationInsights_Mode": "recommended",
"XDT_MicrosoftApplicationInsights_BaseExtensions": "disabled",
"SnapshotDebugger_EXTENSION_VERSION": "disabled",
"InstrumentationEngine_EXTENSION_VERSION": "disabled",
"DiagnosticServices_EXTENSION_VERSION": "~3",
"APPINSIGHTS_PROFILERFEATURE_VERSION": "1.0.0",
"APPINSIGHTS_INSTRUMENTATIONKEY": "key",
"APPINSIGHTS_SNAPSHOTFEATURE_VERSION": "1.0.0",
"ApplicationInsightsAgent_EXTENSION_VERSION": "~2"
}
So my question is "How do I mimic this button with my Azure CLI scripts so it will have absolutely the same impact on my logs and metrics?"