[Feat] 트래킹 모니터링 시스템 구축 (Actuator + Prometheus + 구조화 로깅)#161
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a robust monitoring and observability infrastructure for the real-time tracking system. By integrating Actuator and Prometheus, the team can now monitor system health and performance metrics. Furthermore, the introduction of structured JSON logging and MDC-based context tracking significantly improves the ability to debug and trace user sessions across the application's asynchronous processing flows. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request integrates Spring Boot Actuator, Micrometer Prometheus, and Logstash Logback Encoder to enable structured JSON logging and metrics collection. It also configures MDC to track 'userId' and 'sessionId' across filters, publishers, and consumers. The review feedback suggests revising the MDC key filtering in 'logback-spring.xml' to prevent potential issues with future distributed tracing integrations.
| <encoder class="net.logstash.logback.encoder.LogstashEncoder"> | ||
| <includeMdcKeyName>sessionId</includeMdcKeyName> | ||
| <includeMdcKeyName>userId</includeMdcKeyName> | ||
| <timeZone>Asia/Seoul</timeZone> | ||
| </encoder> |
There was a problem hiding this comment.
[P3] MDC 키 필터링 방식 검토 (향후 분산 추적 연동 고려)
현재 LogstashEncoder 설정에서 <includeMdcKeyName>을 사용하여 sessionId와 userId만 MDC에서 포함하도록 필터링하고 있습니다.
이 방식은 로그를 깔끔하게 유지하는 데 도움이 되지만, 향후 Spring Cloud Sleuth나 Micrometer Tracing 등을 도입하여 분산 추적(traceId, spanId 등)을 로그에 포함하고자 할 때, 해당 MDC 키들이 누락되는 문제가 발생할 수 있습니다.
따라서 특정 MDC 키만 명시적으로 포함하기보다는, 기본적으로 모든 MDC 키를 포함하도록 하거나 제외할 키만 <excludeMdcKeyNames>로 관리하는 방식을 검토해 주세요.
References
- 유지보수성 및 모니터링 시스템과의 연동성을 고려하여 설정을 검토합니다. (link)
🧾 요약
🔗 이슈
✨ 변경 내용
[TAG] 설명 | key=value가독성 포맷 통일✅ 확인