0

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.

Shamshiel
  • 2,051
  • 3
  • 31
  • 50
  • As per this [documentation](https://learn.microsoft.com/en-us/azure/spring-cloud/how-to-prepare-app-deployment?pivots=programming-language-java#metrics), have you specified `spring.jmx.enabled=true` in your configuration property. Otherwise, metrics can't be visualized in Azure portal. – VenkateshDodda Dec 30 '21 at 12:05
  • @VenkateshDodda-MT I checked both applications and neither of them has the config parameter `spring.jmx.enabled=true` set. But _App A_ has the `spring-boot-starter-actuator` maven package installed and _App B_ doesn't. I will try to install that package and check if that changes something. – Shamshiel Dec 30 '21 at 16:16

1 Answers1

0

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

Shamshiel
  • 2,051
  • 3
  • 31
  • 50