Azure / azureml-examples

Official community-driven Azure Machine Learning examples, tested with GitHub Actions.
https://docs.microsoft.com/azure/machine-learning
MIT License
1.76k stars 1.43k forks source link

Not getting logs in app insights #1525

Open pietz opened 2 years ago

pietz commented 2 years ago

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 commented 2 years ago

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.