From 6180838e24698c885091d65603c6ce19c54853f4 Mon Sep 17 00:00:00 2001 From: roger yuan Date: Wed, 19 May 2021 10:02:03 -0600 Subject: [AAI] Export relevant key metrics for monitoring in Prometheus Make the key metrics available to the monitoring system by instrumenting the code. The Key metrics are available via /actuator/prometheus /actuator/info /actuator/health Issue-ID: AAI-3343 Signed-off-by: Roger Yuan Change-Id: If72858484231d95a39c938bacfc1773430806e5a --- aai-traversal/src/test/resources/application-test.properties | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'aai-traversal/src/test/resources/application-test.properties') diff --git a/aai-traversal/src/test/resources/application-test.properties b/aai-traversal/src/test/resources/application-test.properties index 8994c2e..b763c59 100644 --- a/aai-traversal/src/test/resources/application-test.properties +++ b/aai-traversal/src/test/resources/application-test.properties @@ -12,7 +12,8 @@ spring.autoconfigure.exclude=\ org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\ org.keycloak.adapters.springboot.KeycloakAutoConfiguration,\ - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration + org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,\ + org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration spring.jersey.application-path=${schema.uri.base.path} @@ -80,3 +81,9 @@ schema.version.edge.label.start=v12 schema.version.api.default=v23 schema.translator.list=config + +#To expose the Prometheus scraping endpoint in unit test +management.server.port=0 +management.endpoints.enabled-by-default=true +management.endpoints.web.exposure.include=info, health, prometheus +management.metrics.web.server.auto-time-requests=false \ No newline at end of file -- cgit 1.2.3-korg