0

I have the spring boot application exposing actuator/prometheus endpoint for monitoring,

I want to turn off metrics for spring integration components, keeping for http requests only.

I've tried disabling it in configuration according to the documentation in this way:

management:
  metrics:
    enable:
      spring:
        integration: false
 

That did not work for me.

Could you help me?

MaSEL
  • 505
  • 1
  • 5
  • 20
  • Did you try it with a meter filter? https://stackoverflow.com/a/54097060/13211030 – Fullslack Sep 07 '20 at 20:36
  • What do you mean by **spring integration components**? Please look also at [Spring Boot Documentation](https://docs.spring.io/spring-boot/docs/2.1.10.RELEASE/reference/html/production-ready-metrics.html#_per_meter_properties) – Jaden Korr Sep 07 '20 at 20:37
  • @JadenKorr The application is built using spring integration flows starting from http inbound gateway. – MaSEL Sep 08 '20 at 05:00
  • See my answer. It seems there is a confuse with migration from properties to YAML. – Artem Bilan Sep 08 '20 at 14:47

1 Answers1

1

Let's take a look into documentation again!

In addition to MeterFilter beans, it’s also possible to apply a limited set of customization on a per-meter basis using properties. Per-meter customizations apply to any all meter IDs that start with the given name. For example, the following will disable any meters that have an ID starting with example.remote:

management.metrics.enable.example.remote=false

But your YAML config is slightly different in regards spring.integration pattern to match. I think it has to be like this:

management:
  metrics:
    enable:
      spring.integration: false
Artem Bilan
  • 113,505
  • 11
  • 91
  • 118