azureazure-application-insightsazure-spring-cloud

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 App A Metrics Overview

App B Metrics Overview App B Metrics Overview

(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.


Solution

  • 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