diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2025-01-24 16:09:07 +0000 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2025-01-24 16:09:07 +0000 |
commit | 0af1b07966f2c96af30497589fcb14ae5ea6d0d6 (patch) | |
tree | 678f3f16181da886e28214f0a3659ddb093dd530 /cps-application/src/main/java/org/onap | |
parent | 2bad07dc5d0c7e00d7fe609e5e40346d77c6889a (diff) |
Disable JVM process metrics by default
Issue-ID: CPS-2583
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I9c7a543201a63c1f128737bb0995843af6075a6b
Diffstat (limited to 'cps-application/src/main/java/org/onap')
-rw-r--r-- | cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java b/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java index 8481eadf1b..b85f391b8e 100644 --- a/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java +++ b/cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java @@ -28,6 +28,7 @@ import io.micrometer.core.instrument.Gauge; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.binder.MeterBinder; import lombok.RequiredArgsConstructor; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -45,11 +46,13 @@ public class MicroMeterConfig { } @Bean + @ConditionalOnProperty("cps.monitoring.micrometer-jvm-extras") public MeterBinder processMemoryMetrics() { return new ProcessMemoryMetrics(); } @Bean + @ConditionalOnProperty("cps.monitoring.micrometer-jvm-extras") public MeterBinder processThreadMetrics() { return new ProcessThreadMetrics(); } |