Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {

// Monitoring
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-cloudwatch2'
implementation 'io.micrometer:micrometer-registry-prometheus'

// Tracing
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class SecurityConfig {
"/lineups",
"/time-tags",
"/actuator/health",
"/actuator/prometheus",
"/test/**"
};

Expand Down
24 changes: 24 additions & 0 deletions src/main/resources/application-monitoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
management:
server:
port: 9000
endpoints:
web:
exposure:
include: prometheus, health
metrics:
tags:
application: ${spring.application.name}
prometheus:
metrics:
export:
enabled: true
tracing:
sampling:
probability: 1.0

metrics:
distribution:
percentiles-histogram:
http.server.requests: true
tracing:
enabled: true
7 changes: 6 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spring:
hibernate:
ddl-auto: none
profiles:
include: secret
include: secret, monitoring
lifecycle:
# WAS 종료 대기 시간 15초로 설정
timeout-per-shutdown-phase: 15s
Expand Down Expand Up @@ -51,3 +51,8 @@ firebase:
adminsdk:
account:
path: classpath:firebase/firebase-adminsdk-account.json

management:
tracing:
sampling:
probability: 1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 설정은 application-monitoring.yml에 똑같이 정의되어 있어요.
application.yml에 있는 부분은 지우는 게 좋을 것 같아요.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 놓쳤네요 감사합니다!

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 @@

<!-- DEV, PROD: JSON 형식으로 로그 파일 기록 -->
<springProfile name="prod | dev">
<property name="LOG_FILE_PATH" value="/home/ubuntu/2025-festabook/spring-logs"/>
<property name="LOG_FILE_PATH" value="/var/log"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

잘 기억이 나지 않아서, 이거 변경한 이유만 간단하게 남겨주세요! 인지하고 있을게요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

후유 의견으로, 기존 경로는 환경 의존성이 강해서, 서버 자체 환경에서도 표준적으로 수집이가능한 /var/log로 통일했었던 기억이 있습니다.


<appender name="JSON_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_FILE_PATH}/application.json</file>
Expand Down
Loading