Skip to content

Commit

Permalink
Create MicrometerConfig.java
Browse files Browse the repository at this point in the history
  • Loading branch information
making authored Dec 4, 2024
1 parent 939c4d4 commit 947131c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/am/ik/translation/config/MicrometerConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package am.ik.translation.config;

import io.micrometer.core.instrument.config.MeterFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MicrometerConfig {

@Bean
public MeterFilter meterFilter() {
return MeterFilter.deny(id -> {
String uri = id.getTag("uri");
return uri != null && (uri.equals("/readyz") || uri.equals("/livez") || uri.startsWith("/actuator")
|| uri.startsWith("/_static"));
});
}

}

0 comments on commit 947131c

Please sign in to comment.