Per the instructions here, https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-monitor-with-workbooks, when set uploadTarget to AzureMonitor, user need to configure following environment variables
- ResourceId : Your IoT hub resource ID that you retrieved in a previous section.
- UploadTarget : AzureMonitor
- LogAnalyticsWorkspaceId : Your Log Analytics workspace ID that you retrieved in a previous section.
- LogAnalyticsSharedKey : Your Log Analytics key that you retrieved in a previous section.
But with latest Log Analytics Workspace, seems the approach to use agent and shared key to authenticate is no longer been supported, there is no way to get the "Primary key".
This brokes metricsCollector and all monitor workbooks features.