aboutsummaryrefslogtreecommitdiffstats
path: root/cps-application/src
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2025-01-24 16:09:07 +0000
committerdanielhanrahan <daniel.hanrahan@est.tech>2025-01-24 16:09:07 +0000
commit0af1b07966f2c96af30497589fcb14ae5ea6d0d6 (patch)
tree678f3f16181da886e28214f0a3659ddb093dd530 /cps-application/src
parent2bad07dc5d0c7e00d7fe609e5e40346d77c6889a (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')
-rw-r--r--cps-application/src/main/java/org/onap/cps/config/MicroMeterConfig.java3
-rw-r--r--cps-application/src/main/resources/application.yml2
2 files changed, 5 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();
}
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 0b5d59ecc9..6b9c694cf2 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -152,6 +152,8 @@ security:
password: ${CPS_PASSWORD:cpsr0cks!}
cps:
+ monitoring:
+ micrometer-jvm-extras: false
tracing:
sampler:
jaeger_remote: