Reputation: 4898
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.
Upvotes: 2
Views: 666
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
Reputation: 1220
Try to set the following flag in application.properties
:
spring.metrics.export.enabled=false
Upvotes: 1