Skip to content

[FEATURE] 모니터링 관련 설정 추가 - #7

Merged
fervovita merged 3 commits into
devfrom
feat/#6-monitoring
Jul 26, 2026
Merged

[FEATURE] 모니터링 관련 설정 추가#7
fervovita merged 3 commits into
devfrom
feat/#6-monitoring

Conversation

@fervovita

@fervovita fervovita commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

🚀 Related issue

Closes #6

#️⃣ Summary

  • 메트릭/트레이스/로그 수집을 연동하고, 배포 방식을 docker rundocker compose로 전환

🔧 Changes

  • 로컬 개발용 docker-compose.yaml 추가 (rabbitmq는 메인 앱과 공유)
  • Actuator + Micrometer Prometheus 레지스트리로 메트릭 노출
  • OpenTelemetry 트레이싱 연동
  • RabbitMQ 리스너 observation 활성화
  • 운영 환경 JSON 로깅 추가 (logback-spring.xml)

💬 Reviewer Notes

  • 리뷰어나 같이 작업하는 사람들에게 남길 코멘트

Summary by CodeRabbit

  • 새로운 기능

    • 프로덕션 환경에서 알림 워커 서비스를 Docker Compose로 배포할 수 있습니다.
    • 로컬 개발 환경에 Mailpit 기반 이메일 테스트 서버가 추가되었습니다.
    • 애플리케이션 상태 확인, Prometheus 메트릭 및 OTLP 트레이싱 설정을 지원합니다.
    • 메시지 처리 과정의 관측성과 트레이스 정보가 강화되었습니다.
    • 환경별 콘솔 및 구조화된 JSON 로그 형식을 제공합니다.
  • 개선 사항

    • 배포 시 트레이싱 관련 필수 설정을 검증합니다.
    • 테스트 환경에서는 OTLP 트레이싱 전송을 비활성화합니다.

@fervovita fervovita self-assigned this Jul 26, 2026
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@fervovita, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: dfbb0b0b-f904-406f-aa06-ca07a013bdd9

📥 Commits

Reviewing files that changed from the base of the PR and between 33304c1 and ba6a26d.

📒 Files selected for processing (1)
  • .env.example
📝 Walkthrough

Walkthrough

OTLP tracing과 관리 엔드포인트 설정, RabbitMQ observation, 프로파일별 로깅 구성이 추가되었습니다. 로컬 Mailpit과 프로덕션 Compose 배포가 구성되었으며, 배포 스크립트의 필수 환경변수 검증과 테스트 설정이 갱신되었습니다.

Changes

모니터링 및 배포 구성

Layer / File(s) Summary
런타임 관측 구성
src/main/java/ditda/notification/config/RabbitConfig.java, src/main/resources/application.yaml, src/main/resources/logback-spring.xml
RabbitMQ listener factory에서 observation을 활성화하고, OTLP tracing·관리 엔드포인트·애플리케이션 식별자·프로파일별 로깅을 구성합니다.
실행 환경 및 배포 wiring
.env.example, docker-compose.yaml, docker-compose.prod.yaml, scripts/deploy.sh
Tracing 환경변수 예시, 로컬 Mailpit, 프로덕션 worker Compose 서비스와 외부 네트워크를 추가하고, 배포 스크립트가 Compose를 사용하도록 변경합니다.
빌드 및 테스트 설정 정렬
build.gradle, src/test/resources/application-test.yaml
Gradle 설정의 들여쓰기를 정리하고, 테스트 환경의 메일 비밀번호 및 OTLP tracing export 설정을 지정합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RabbitMQ
  participant RabbitConfig
  participant NotificationWorker
  participant OTLPCollector
  RabbitMQ->>NotificationWorker: 메시지 전달
  NotificationWorker->>RabbitConfig: listener factory 사용
  RabbitConfig->>NotificationWorker: observation 활성화
  NotificationWorker->>OTLPCollector: OTLP trace export
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning build.gradle의 서식 정리처럼 모니터링/배포 전환과 무관한 변경이 포함되어 있습니다. build.gradle의 단순 포맷 변경은 분리하거나 제거하고, 모니터링·compose 관련 변경만 남기세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed 모니터링 설정(메트릭, 트레이싱, 로그)과 Docker Compose 전환 요구를 반영해 이슈 #6 목적을 충족합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 모니터링 설정 추가와 배포 방식 전환이라는 변경 사항을 잘 요약한 제목입니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#6-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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.env.example:
- Around line 13-15: Update the OTLP_TRACING_ENDPOINT example value in the
Tracing configuration to use http://localhost:4318/v1/traces, matching the
application default and local compose environment; leave OTLP_TRACING_ENABLED
unchanged.

In `@scripts/deploy.sh`:
- Line 88: Before running docker compose up in the deployment flow, remove the
existing ditda-notification-worker container created by the prior docker run
deployment, tolerating the case where it does not exist. Keep the existing
docker compose command unchanged so the Compose deployment can recreate the
container without a name conflict.

In `@src/main/resources/logback-spring.xml`:
- Around line 30-34: Update the ASYNC_JSON AsyncAppender configuration to enable
non-blocking behavior by setting neverBlock to true, while preserving the
existing queueSize and discardingThreshold settings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: de7e72e9-f9be-4693-a3e4-32a15b50d88f

📥 Commits

Reviewing files that changed from the base of the PR and between bc4f00b and 33304c1.

📒 Files selected for processing (9)
  • .env.example
  • build.gradle
  • docker-compose.prod.yaml
  • docker-compose.yaml
  • scripts/deploy.sh
  • src/main/java/ditda/notification/config/RabbitConfig.java
  • src/main/resources/application.yaml
  • src/main/resources/logback-spring.xml
  • src/test/resources/application-test.yaml

Comment thread .env.example Outdated
Comment thread scripts/deploy.sh
Comment thread src/main/resources/logback-spring.xml
@fervovita
fervovita merged commit 498c1f2 into dev Jul 26, 2026
2 checks passed
@fervovita
fervovita deleted the feat/#6-monitoring branch July 26, 2026 12:12
@fervovita fervovita mentioned this pull request Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 모니터링 관련 설정 추가

1 participant