In Azure, we have 3 different services -
Each provide different level of logs metrics on object storage or blob files.
But is there any way to get Container level detailed logs or Container level aggregate metric logs ?
How to get Container level logs in Azure
I use Log Analytics Workspace which gives all logs of blob/container level. Firstly, In your storage account , In Diagnostic settings and then on blob:
Then click on Add Diagnostic setting:
Then Click on all logs and select the Log Analytics Workspace and then save as below:
Then in Log Analytics workspace , in Logs use below KQL Query to get container logs:
StorageBlobLogs
| extend rith = split(Uri,'/')
| extend cho= split(rith[3],'?')
| where cho[0] == "container name"
| project-away rith,cho
Output: