Skip to content

모니터링 SDK 추가#75

Merged
swthewhite merged 3 commits into
developfrom
feature/#74
Dec 29, 2025
Merged

모니터링 SDK 추가#75
swthewhite merged 3 commits into
developfrom
feature/#74

Conversation

@swthewhite
Copy link
Copy Markdown
Contributor

🍀 이슈 번호


✅ 작업 사항

  • 모니터링 SDK 추가

⌨ 기타

@swthewhite swthewhite added the 🔗 chore 패키지 매니저 수정, 기타 설정(ex. .gitignore) label Dec 29, 2025
@swthewhite swthewhite linked an issue Dec 29, 2025 that may be closed by this pull request
1 task
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @swthewhite, 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!

이 PR은 애플리케이션에 모니터링 기능을 통합하여 가시성을 향상시키는 것을 목표로 합니다. Prometheus를 통해 메트릭을 수집하고 Loki를 통해 로그를 중앙 집중화함으로써, 애플리케이션의 상태와 성능을 보다 효과적으로 추적하고 분석할 수 있게 됩니다.

Highlights

  • Prometheus 종속성 추가: Micrometer Prometheus 레지스트리 종속성을 추가하여 애플리케이션 메트릭 수집을 활성화했습니다.
  • Loki Logback Appender 종속성 추가: Loki-Logback-Appender 종속성을 추가하여 애플리케이션 로그를 Loki로 전송할 수 있도록 했습니다.
  • Spring Boot Actuator 설정 업데이트: Prometheus 및 메트릭 엔드포인트를 노출하도록 Actuator 설정을 업데이트하고, 메트릭에 애플리케이션 태그를 추가했습니다.
  • logback-spring.xml 파일 추가: Loki로 로그를 전송하기 위한 Logback 설정을 포함하는 새 XML 파일을 추가했습니다.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. 모니터링 SDK 추가를 위한 PR 잘 보았습니다. Prometheus와 Loki를 연동하여 애플리케이션의 메트릭과 로그를 수집할 수 있도록 기반을 마련해주셨네요. 전반적으로 변경 사항은 명확하고 목적에 부합합니다. 다만, logback-spring.xml 파일에 Loki 서버 주소가 하드코딩되어 있어 환경에 따라 유연하게 대처하기 어려운 점이 있습니다. 이 부분을 외부 설정으로 분리하도록 수정 제안을 남겼습니다. 이 부분을 수정하면 더 완성도 높은 코드가 될 것 같습니다. 수고하셨습니다!

Comment thread src/main/resources/logback-spring.xml Outdated
<configuration>
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
<http>
<url>http://MONITORING_SERVER_IP:3100/loki/api/v1/push</url>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

Loki URL이 플레이스홀더(MONITORING_SERVER_IP)와 함께 하드코딩되어 있습니다. 이 설정은 환경별로 달라져야 하므로 application.yml 파일로 외부화하는 것이 좋습니다. 이렇게 하면 코드를 변경하지 않고도 로컬, 개발, 운영 환경에 맞게 설정을 변경할 수 있어 유연성이 높아집니다.

logback-spring.xml 파일에 <springProperty>를 사용하여 application.yml의 프로퍼티를 가져올 수 있습니다. 그리고 application.yml에 각 프로필에 맞는 Loki URL을 추가해주세요.

logback-spring.xml 수정 예시:

<configuration>
    <springProperty scope="context" name="lokiUrl" source="loki.url" defaultValue="http://localhost:3100/loki/api/v1/push"/>
    <appender name="LOKI" ...>
        <http>
            <url>${lokiUrl}</url>
        </http>
        ...
    </appender>
    ...
</configuration>

application.yml 추가 예시:

loki:
  url: http://your-loki-host:3100/loki/api/v1/push
Suggested change
<url>http://MONITORING_SERVER_IP:3100/loki/api/v1/push</url>
<url>${loki.url}</url>

@swthewhite swthewhite merged commit d9e4bdb into develop Dec 29, 2025
1 check failed
@swthewhite swthewhite deleted the feature/#74 branch December 29, 2025 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔗 chore 패키지 매니저 수정, 기타 설정(ex. .gitignore)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 모니터링 SDK 추가

1 participant