MaSEL
MaSEL

Reputation: 525

Disable spring integration metrics

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?

Upvotes: 0

Views: 1093

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121550

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

Upvotes: 1

Related Questions