Ealon
Ealon

Reputation: 4898

Remove Spring default metrics data

Is there any way I can remove Spring default metrics data? I did not find any way to do this in Spring metrics documentation.

Spring endpoints documentation does provide a way to disable the metrics endpoint, but I don't want to disable the endpoint, I just want to remove the default metrics data. Thanks for your help.

enter image description here

Upvotes: 2

Views: 666

Answers (2)

Ealon
Ealon

Reputation: 4898

I had a different solution. I first disabled the metrics endpoint using endpoints.metrics.enabled:false. Then I created a rest api for /metrics.

Upvotes: 0

Bogdan Kobylynskyi
Bogdan Kobylynskyi

Reputation: 1220

Spring doc

Try to set the following flag in application.properties:

spring.metrics.export.enabled=false

Upvotes: 1

Related Questions