Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ dependencies {
runtimeOnly 'org.postgresql:postgresql'
runtimeOnly 'com.h2database:h2'

// Metrics
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'

// Logging
implementation 'net.logstash.logback:logstash-logback-encoder:7.4'

Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ management:
endpoints:
web:
exposure:
include: "health"
include: "health,prometheus"
endpoint:
health:
show-details: never
metrics:
tags:
application: opic-practice
env: production

logging:
file:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<springProperty scope="context" name="LOG_PATH" source="logging.file.path" defaultValue="/tmp/logs"/>
<springProperty scope="context" name="LOG_FILE_NAME" source="logging.file.name" defaultValue="application"/>

<springProfile name="prod">
<springProfile name="prod,load-test">
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${LOG_FILE_NAME}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Expand Down