缺少指标 - Azure Spring 云

Missing Metrics - Azure Spring Cloud

我在 Azure 中有一个 Azure Spring Cloud 资源,其中包含两个应用程序。为了简单起见,我们将这些应用称为 App AApp B.

我想为这两个应用程序设置监控和警报,但实际上只有一个应用程序编写了所需的指标。根据 Azure documentation,应用仪表板应显示某些指标,例如 tomcat.global.request.total.count,但只有 App A 会显示这些指标。 App B 没有写这些指标,我想知道为什么,因为我在 Azure 文档中找不到任何指示我必须设置一些东西才能工作。

App A Metrics Overview

App B Metrics Overview

(Both apps had traffic in the displayed timeframe)

我是否必须安装一些 Maven 包或进行一些其他配置才能使这些默认指标起作用?我尝试安装 Maven 包 applicationinsights-spring-boot-starter 但这并没有改变任何东西。

根据此 documentation,maven 包 spring-boot-starter-actuator 丢失。在我将 spring-boot-starter-actuator 添加到我的项目后,指标开始在 Azure 中运行。没必要设置配置 spring.jmx.enabled=true