简体   繁体   中英

Missing Metrics - Azure Spring Cloud

I have a Azure Spring Cloud resource in Azure that contains two apps. To keep it simple lets call these apps App A and App B .

I wanted to set up monitoring and alerting for these two apps but only one of them actually writes the required metrics. According to the Azure documentation the app dashboard should display certain metrics like tomcat.global.request.total.count but only App A does that. App B doesn't write those metrics and I'm wondering why because I can't find any indication in the Azure documentation that I have to setup something for this to work.

App A Metrics Overview应用 A 指标概述

App B Metrics Overview App B 指标概览

(Both apps had traffic in the displayed timeframe)

Do I have to install some maven packages or do some other configuration to get these default metrics to work? I tried to install the maven package applicationinsights-spring-boot-starter but that didn't change anything.

The maven package spring-boot-starter-actuator was missing as per this documentation . After I added the spring-boot-starter-actuator to my project the metrics started working in Azure. It was not necessary to set the configuration spring.jmx.enabled=true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM