Configure Application Insights to receive monitoring information from your apps
You now know how to live stream any logs to your console. Next, you will check Application Insights for your apps. Spring Apps Service uses an in-process Java Agent for Application Insights. When you first created your service, an Application Insights resource also got created for you by default. Double check whether this Application Insights instance is properly linked to your Spring Apps Service. If it is not, re-link Application Insights. You can use the following guidance to perform this task:
Step by step guidance
-
Application Insights should be enabled by default already. You can check this by checking the portal. Navigate to your Spring Apps Service and click on the Application Insights tab in the Monitoring section. Alternativly you can use the Azure CLI to check this:
az spring app-insights show \ --name $SPRING_APPS_SERVICE \ --resource-group $RESOURCE_GROUP
If you see an Application Insights instance, you can skip the next step.
-
(OPTIONAL) If you do not see an Application Insights instance, you can enable it by using the Azure CLI:
# Read AppInsights Connection String az monitor app-insights component show \ --app $SPRING_APPS_SERVICE \ --resource-group $RESOURCE_GROUP \ --query connectionString \ --output tsv
az spring app-insights update \ --name $SPRING_APPS_SERVICE \ --resource-group $RESOURCE_GROUP \ --app-insights $SPRING_APPS_SERVICE
This will update Spring Apps to use Application Insights instance.