Skip to content

feat: Prometheus 연동을 위한 Actuator 설정 추가#33

Merged
23tae merged 1 commit intodevelopfrom
feature/monitoring
Nov 10, 2025
Merged

feat: Prometheus 연동을 위한 Actuator 설정 추가#33
23tae merged 1 commit intodevelopfrom
feature/monitoring

Conversation

@23tae
Copy link
Copy Markdown
Member

@23tae 23tae commented Nov 10, 2025

📝 작업 내용

모니터링 시스템(Prometheus)이 서버의 애플리케이션 지표(JVM, Spring Boot)를 수집할 수 있도록 Actuator 설정을 추가하고 관련 의존성을 설정했습니다.

⚡ 주요 변경사항

  • build.gradle.kts: micrometer-registry-prometheus 의존성을 추가했습니다.
  • application-dev.yml: Actuator의 prometheus 엔드포인트를 9000번 포트로 노출시키는 설정을 추가했습니다.

📌 리뷰 포인트

📋 체크리스트

  • ✍ PR 제목 규칙을 맞췄나요? (예: feat: 기능1 추가)
  • 📝 관련 이슈를 등록했나요?
  • ✅ 모든 테스트가 통과했나요?
  • 🏗 빌드가 정상적으로 완료되었나요?

Summary by CodeRabbit

새로운 기능

  • 애플리케이션 모니터링 및 메트릭 수집 기능이 추가되었습니다.
  • 헬스 체크 엔드포인트를 통해 애플리케이션 상태를 확인할 수 있습니다.
  • Prometheus 메트릭 수집을 지원합니다.

@23tae 23tae self-assigned this Nov 10, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 10, 2025

개요

Prometheus 메트릭 모니터링을 위한 의존성 및 Actuator 설정을 추가했습니다. build.gradle.ktsmicrometer-registry-prometheus 의존성을 추가하고, application-dev.yml에서 헬스 및 Prometheus 엔드포인트를 노출하도록 관리 서버 포트와 메트릭 태그를 구성합니다.

변경 사항

응집도 / 파일 변경 요약
Prometheus 의존성 추가
build.gradle.kts
Micrometer Prometheus 레지스트리 의존성 추가
Actuator 관리 설정
src/main/resources/application-dev.yml
헬스 및 prometheus 엔드포인트 노출, 관리 서버 포트 9000으로 설정, 애플리케이션 이름 메트릭 태그 등록

예상 코드 리뷰 노력

🎯 1 (단순함) | ⏱️ ~5분

  • 구성 기반의 직관적인 변경사항
  • 새로운 의존성 추가 및 표준 Actuator 설정만 포함
  • 비즈니스 로직 또는 제어 흐름 변경 없음

관련 가능성 있는 PR

  • feat: CI/CD 파이프라인 구축 #6: 유사한 모니터링 설정 변경으로, 해당 PR에서는 spring-boot-starter-actuator를 추가했으며 이 PR에서는 micrometer-registry-prometheus 의존성과 Actuator 관리 설정을 추가하여 관련성이 있습니다.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경 사항의 핵심 내용인 Prometheus 모니터링을 위한 Actuator 설정 추가를 명확하게 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/monitoring

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/resources/application-dev.yml (1)

38-38: 추가 Actuator 엔드포인트 고려

현재 healthprometheus만 노출하고 있습니다. 개발 환경에서 필요시 다음 엔드포인트 추가 검토:

  • metrics: 상세 메트릭 데이터 조회
  • env: 환경 변수 확인 (개발 시에만)
  • threaddump, heapdump: 문제 진단 시 필요

프로덕션에서는 보안상 healthprometheus만 노출하는 것이 권장됩니다.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a624f51 and ef31509.

📒 Files selected for processing (2)
  • build.gradle.kts (1 hunks)
  • src/main/resources/application-dev.yml (1 hunks)
🔇 Additional comments (2)
src/main/resources/application-dev.yml (1)

34-43: 검증 완료: 원본 리뷰 의견 해결

설정을 완전히 검증한 결과, 모든 우려사항이 해결되었습니다:

  1. spring.application.name: ✅ application.yml에서 "eodigo"로 정의됨
  2. 포트 9000 충돌: ✅ Dev 환경만 사용, 다른 서비스와 충돌 없음
  3. 프로덕션 보안: ✅ Spring Boot 기본값 적용 (안전한 설정)
    • 기본적으로 /health 엔드포인트만 노출됨
    • 다른 actuator 엔드포인트는 비활성화됨
    • 명시적 프로덕션 설정 불필요

현재 구성은 Spring Boot 모범 사례를 따르고 있습니다. Dev 환경의 관리 포트 분리는 운영 보안 관점에서 적절한 설계입니다.

build.gradle.kts (1)

54-55: Spring Boot BOM에서 의존성 관리 확인됨 - 승인

Spring Boot 3.5.4는 io.micrometer:micrometer-registry-prometheus 버전 1.15.4를 포함합니다. 따라서 build.gradle.kts에서 명시적 버전을 지정하지 않은 것은 올바른 방식이며, Spring Boot의 의존성 관리(BOM)에서 자동으로 버전이 관리됩니다. 의존성 추가가 적절하게 구현되었습니다.

@23tae 23tae merged commit 6a7aa38 into develop Nov 10, 2025
2 checks passed
@23tae 23tae deleted the feature/monitoring branch November 10, 2025 14:01
@coderabbitai coderabbitai bot mentioned this pull request Nov 10, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant