[英]How to monitor container app metrics in azure
I'm new to the azure environment and wondering how it's possible to monitor an azure container app?我是 azure 环境的新手,想知道如何监控 azure 容器应用程序? Currently I've deployed a nodejs application by running a container app and I know how to query some logs by using the protocols section.目前我已经通过运行容器应用程序部署了一个 nodejs 应用程序,并且我知道如何使用协议部分来查询一些日志。
What I'm really looking into is how to get metrics like incoming requests or vcpu usage but I don't know how to get those metrics using azure monitoring.我真正在研究的是如何获取传入请求或 vcpu 使用情况等指标,但我不知道如何使用 azure 监控来获取这些指标。
How can I access those values?如何访问这些值?
It is possible to add Azure application insights SDK to your nodejs project.可以将 Azure 应用程序洞察 SDK 添加到您的 nodejs 项目中。 It will monitor your app activity like incoming/outcoming requests, database operations and etc. Also there is an option to add automatic metrics gathering:它将监视您的应用程序活动,例如传入/传出请求、数据库操作等。还有一个添加自动指标收集的选项:
See thisdocumentation link for details.有关详细信息,请参阅此文档链接。
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.