From d422d8e8d4825735b4652fe2c3d087cdb2ab127b Mon Sep 17 00:00:00 2001 From: PgmJun <84304802+PgmJun@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:10:59 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20Prometheus=20=EB=A7=A4=ED=8A=B8?= =?UTF-8?q?=EB=A6=AD=20=EC=88=98=EC=A7=91=EC=9D=84=20=EC=9C=84=ED=95=9C=20?= =?UTF-8?q?Actuator=20=EC=84=A4=EC=A0=95=20#333?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 1 + backend/src/main/resources/application-prod.yml | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index 8c9d4ba3a..0933fe9f6 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -34,6 +34,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index 05efe6406..a17cd8cf0 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -39,10 +39,15 @@ logging: location: ${secret.application.log.location} management: - endpoint: - health: - show-details: always + server: + port: ${secret.actuator.port} + endpoints: + enabled-by-default: false web: exposure: - include: "health" + include: ${secret.actuator.web.include} + base-path: ${secret.actuator.web.base-url} + jmx: + exposure: + exclude: ${secret.actuator.jmx.exclude}