summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2020-12-05 18:42:06 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2020-12-05 18:42:06 +0100
commit3563c975492da066032815ca279a1309b5562db2 (patch)
tree39ed9c77fda90ad4c8c43050161f5e5b4cb7fbc1
parentHide more expensive transaction options by default (diff)
downloadseven-wonders-3563c975492da066032815ca279a1309b5562db2.tar.gz
seven-wonders-3563c975492da066032815ca279a1309b5562db2.tar.bz2
seven-wonders-3563c975492da066032815ca279a1309b5562db2.zip
Enable actuator and prometheus metrics
-rw-r--r--sw-server/build.gradle.kts5
-rw-r--r--sw-server/src/main/resources/application.properties4
2 files changed, 9 insertions, 0 deletions
diff --git a/sw-server/build.gradle.kts b/sw-server/build.gradle.kts
index 3d2c3477..0b3e9482 100644
--- a/sw-server/build.gradle.kts
+++ b/sw-server/build.gradle.kts
@@ -20,8 +20,13 @@ dependencies {
// required by spring security when using websockets
implementation("org.springframework.security:spring-security-messaging")
+ // logging
implementation("ch.qos.logback:logback-classic:1.1.8")
+ // monitoring / metrics
+ implementation("org.springframework.boot:spring-boot-starter-actuator")
+ implementation("io.micrometer:micrometer-registry-prometheus:1.6.1")
+
testImplementation(kotlin("test"))
testImplementation(kotlin("test-junit"))
testImplementation(project(":sw-client"))
diff --git a/sw-server/src/main/resources/application.properties b/sw-server/src/main/resources/application.properties
index 5ee314c7..bd16f43f 100644
--- a/sw-server/src/main/resources/application.properties
+++ b/sw-server/src/main/resources/application.properties
@@ -1 +1,5 @@
server.port=8000
+
+# enable and expose prometheus endpoint in Spring Boot Actuator
+management.endpoint.prometheus.enabled=true
+management.endpoints.web.exposure.include=prometheus
bgstack15