[英]How to get the Metrics for App Service Environment (by Azure Monitor)?
[英]How to monitor container app metrics in azure
我是 azure 環境的新手,想知道如何監控 azure 容器應用程序? 目前我已經通過運行容器應用程序部署了一個 nodejs 應用程序,並且我知道如何使用協議部分來查詢一些日志。
我真正在研究的是如何獲取傳入請求或 vcpu 使用情況等指標,但我不知道如何使用 azure 監控來獲取這些指標。
如何訪問這些值?
可以將 Azure 應用程序洞察 SDK 添加到您的 nodejs 項目中。 它將監視您的應用程序活動,例如傳入/傳出請求、數據庫操作等。還有一個添加自動指標收集的選項:
有關詳細信息,請參閱此文檔鏈接。
let appInsights = require("applicationinsights");
appInsights.setup("<instrumentation_key>")
.setAutoDependencyCorrelation(true)
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true, true)
.setAutoCollectExceptions(true)
.setAutoCollectDependencies(true)
.setAutoCollectConsole(true)
.setUseDiskRetryCaching(true)
.setSendLiveMetrics(true)
.start();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.