azureml-examples icon indicating copy to clipboard operation
azureml-examples copied to clipboard

Not getting logs in app insights

Open pietz opened this issue 3 years ago • 1 comments

Which example? Describe the issue

example: online-endpoints-simple-deployment.ipynb

description: My code is based on this notebook. However, I added the app_insights_enabled flag to the deployment variable in order to save logs generated in score.py to application insights. This doesn't work. I tried print statements and logging.info statements but I cannot see any of these entries in application insights of the deployment.

How can I solve this problem? Or what's the recommended way to save custom logging commands to an azure logging service?

pietz avatar Jul 28 '22 09:07 pietz

Apparently, the workflow has changed with real-time and batch online endpoints. Microsoft has recently updated their docs accordingly: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-monitor-online-endpoints

Other than that I found it's also possible to use the AzureLogHandler and a separate instance of Application Insights to log custom messages.

pietz avatar Aug 09 '22 08:08 pietz