diff --git a/backend/build.gradle b/backend/build.gradle index 9a673a7c..e6d93177 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -62,6 +62,10 @@ dependencies { // S3 implementation 'com.amazonaws:aws-java-sdk-s3:1.12.773' + + // monitoring + implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'io.micrometer:micrometer-registry-prometheus' } tasks.named('test') { diff --git a/backend/src/main/resources/application-dev.yml b/backend/src/main/resources/application-dev.yml index 7d23be41..39da4642 100644 --- a/backend/src/main/resources/application-dev.yml +++ b/backend/src/main/resources/application-dev.yml @@ -26,3 +26,12 @@ aws: bucket: techcourse-project-2024 key-prefix: mouda/dev/asset/profile/ prefix: https://dev.mouda.site/profile/ + +management: + endpoints: + web: + exposure: + include: prometheus + endpoint: + health: + show-details: always diff --git a/backend/src/main/resources/application-local.yml b/backend/src/main/resources/application-local.yml index 33a88edc..da6b02be 100644 --- a/backend/src/main/resources/application-local.yml +++ b/backend/src/main/resources/application-local.yml @@ -40,3 +40,12 @@ aws: url: base: http://localhost:8081 + +management: + endpoints: + web: + exposure: + include: prometheus + endpoint: + health: + show-details: always diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index 53455a77..ea650ee0 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -43,3 +43,12 @@ aws: bucket: techcourse-project-2024 key-prefix: mouda/dev/asset/profile/ prefix: https://dev.mouda.site/profile/ + +management: + endpoints: + web: + exposure: + include: prometheus + endpoint: + health: + show-details: always