diff --git a/hippo4j-example/hippo4j-spring-boot-starter-example/pom.xml b/hippo4j-example/hippo4j-spring-boot-starter-example/pom.xml index 830e8834..84572a63 100644 --- a/hippo4j-example/hippo4j-spring-boot-starter-example/pom.xml +++ b/hippo4j-example/hippo4j-spring-boot-starter-example/pom.xml @@ -26,6 +26,16 @@ ${revision} + + io.micrometer + micrometer-registry-prometheus + + + + org.springframework.boot + spring-boot-starter-actuator + + org.springframework.boot spring-boot-starter-web diff --git a/hippo4j-example/hippo4j-spring-boot-starter-example/src/main/resources/application.properties b/hippo4j-example/hippo4j-spring-boot-starter-example/src/main/resources/application.properties index f36d13d0..6647ba01 100644 --- a/hippo4j-example/hippo4j-spring-boot-starter-example/src/main/resources/application.properties +++ b/hippo4j-example/hippo4j-spring-boot-starter-example/src/main/resources/application.properties @@ -2,14 +2,21 @@ server.port=8088 server.servlet.context-path=/example +management.metrics.export.prometheus.enabled=true +management.server.port=29901 +management.endpoints.web.exposure.include=* + spring.profiles.active=dev spring.application.name=dynamic-threadpool-example spring.dynamic.thread-pool.server-addr=http://localhost:6691 -spring.dynamic.thread-pool.netty-server-port=8899 ### Use netty to report thread pool monitoring data. The default is http. # spring.dynamic.thread-pool.report-type=netty +# spring.dynamic.thread-pool.netty-server-port=8899 spring.dynamic.thread-pool.namespace=prescription spring.dynamic.thread-pool.item-id=dynamic-threadpool-example spring.dynamic.thread-pool.username=admin spring.dynamic.thread-pool.password=123456 + +# Enable server and prometheus monitoring at the same time +spring.dynamic.thread-pool.collect-type=server,prometheus