From 6d9abe2de1816966869cb7ae4352816f7dcab043 Mon Sep 17 00:00:00 2001 From: KimDoubleB Date: Sat, 3 Aug 2024 22:48:38 +0900 Subject: [PATCH] feat: added actuator dependencies --- piikii-bootstrap/build.gradle.kts | 2 ++ .../main/resources/application-actuator.yml | 31 +++++++++++++++++++ .../src/main/resources/application.yml | 1 + 3 files changed, 34 insertions(+) create mode 100644 piikii-bootstrap/src/main/resources/application-actuator.yml diff --git a/piikii-bootstrap/build.gradle.kts b/piikii-bootstrap/build.gradle.kts index 23b6965c..eb3c38fd 100644 --- a/piikii-bootstrap/build.gradle.kts +++ b/piikii-bootstrap/build.gradle.kts @@ -10,6 +10,8 @@ dependencies { implementation(project(":piikii-output-web:tmap")) implementation("org.springframework.boot:spring-boot-starter-web") + implementation("org.springframework.boot:spring-boot-starter-actuator") + runtimeOnly("io.micrometer:micrometer-registry-prometheus") testImplementation(project(":piikii-application")) } diff --git a/piikii-bootstrap/src/main/resources/application-actuator.yml b/piikii-bootstrap/src/main/resources/application-actuator.yml new file mode 100644 index 00000000..451bb68d --- /dev/null +++ b/piikii-bootstrap/src/main/resources/application-actuator.yml @@ -0,0 +1,31 @@ +management: + endpoints: + enabled-by-default: false + web: + base-path: /_status + exposure: + include: health, metrics, prometheus + metrics: + distribution: + percentiles-histogram: + http.server.requests: true + percentiles: + http.server.requests: 0.5, 0.8, 0.95, 0.99, 1.0 + health: + livenessstate: + enabled: true + readinessstate: + enabled: true + defaults: + enabled: false + ping: + enabled: true + endpoint: + metrics: + enabled: true + prometheus: + enabled: true + health: + enabled: true + probes: + enabled: true diff --git a/piikii-bootstrap/src/main/resources/application.yml b/piikii-bootstrap/src/main/resources/application.yml index 90145bd4..6ae1dbc1 100644 --- a/piikii-bootstrap/src/main/resources/application.yml +++ b/piikii-bootstrap/src/main/resources/application.yml @@ -6,6 +6,7 @@ spring: - classpath:lemon-config/application.yml - classpath:avocado-config/application.yml - classpath:tmap-config/application.yml + - classpath:application-actuator.yml application: name: "piikii" messages: