Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
22 changes: 22 additions & 0 deletions src/main/resources/application-monitoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
server:
tomcat:
mbeanregistry:
enabled: true

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
6 changes: 1 addition & 5 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ server:
context-path: /api
shutdown: graceful
forward-headers-strategy: native
tomcat:
mbeanregistry:
enabled: true

spring:
datasource:
Expand All @@ -21,7 +18,7 @@ spring:
hibernate:
ddl-auto: none
profiles:
include: secret
include: secret, monitoring
lifecycle:
# WAS 종료 대기 시간 15초로 설정
timeout-per-shutdown-phase: 15s
Expand All @@ -31,7 +28,6 @@ spring:
max-file-size: 10MB
max-request-size: 11MB


storage:
image:
max-size: 10485760 # 10 * 1024 * 1024, 10MB
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 @@

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