diff --git a/build.gradle.kts b/build.gradle.kts index 92f189f..3b80538 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -61,6 +61,9 @@ dependencies { testImplementation("org.testcontainers:junit-jupiter") testImplementation("com.redis.testcontainers:testcontainers-redis-junit:1.6.4") + //monitoring + implementation("org.springframework.boot:spring-boot-starter-actuator") + runtimeOnly("io.micrometer:micrometer-registry-prometheus") // rest docs testImplementation("org.springframework.restdocs:spring-restdocs-mockmvc") diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index aac4c1d..f521df2 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -47,3 +47,20 @@ service: local-storage: directory: http://localhost/qbox/image/ url: http://localhost:5172 + + +management: + endpoint: + prometheus: + enabled: true + endpoints: + enabled-by-default: false + jmx: + exposure: + exclude: "*" + web: + exposure: + include: health, info, prometheus + base-path: /actuator + server: + port: 8081 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1431976..437e2dc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -49,4 +49,20 @@ service: local-storage: directory: ${LOCAL_STORAGE_DIRECTORY} - url: ${LOCAL_STORAGE_URL} \ No newline at end of file + url: ${LOCAL_STORAGE_URL} + +management: + endpoint: + prometheus: + enabled: true + endpoints: + enabled-by-default: false + jmx: + exposure: + exclude: "*" + web: + exposure: + include: health, info, prometheus + base-path: ${ACTUATOR_PATH} + server: + port: ${ACTUATOR_PORT} \ No newline at end of file