[英]Stream Azure container logging to web app
我希望擴展我的 web 應用程序的功能,以便能夠顯示自定義 Azure 日志查詢的結果,如下所示:
let apiIds = KubePodInventory
| where ServiceName == "my-service-name"
| distinct ContainerID;
ContainerLog
| where ContainerID in (apiIds)
and LogEntry contains ("my custom query")
| order by TimeGenerated desc
| project TimeGenerated, LogEntry
一個很好的補充是也有實時日志記錄。
但是,我不知道從哪里開始。 是否有人對這個想法有(好/壞)經驗?
(如評論中所述)
您可以在您的應用程序中使用 Azure 監視器查詢 SDK https://github.com/Azure/azure-sdk-for.net/tree/main/sdk/monitor/Azure.Monitor.Query
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.