Skip to content

[UPLUS-148] 모니터링 지표 추가#14

Merged
swthewhite merged 2 commits into
developfrom
feat/UPLUS-148
Jan 26, 2026
Merged

[UPLUS-148] 모니터링 지표 추가#14
swthewhite merged 2 commits into
developfrom
feat/UPLUS-148

Conversation

@swthewhite
Copy link
Copy Markdown
Contributor

🎫 지라 티켓

UPLUS-148


✅ 작업 사항

  • activeJobsGauge: 실행 중인 Job 수
  • jobCompletedCounter/jobFailedCounter: Job 성공/실패 카운터
  • partitionCompletedCounter/partitionFailedCounter: 파티션 상태별 카운터
  • chunkCounter: 청크 처리 카운터
  • stepDurationTimer: Step 실행 시간 히스토그램
  • JobResultListener: Job 시작/종료 시 메트릭 업데이트
  • PartitionTimingListener: 파티션 완료 시 메트릭 기록
  • TimeBasedChunkListener: 청크 완료 시 카운터 증가

📋 체크리스트

  • 코드가 정상적으로 빌드됩니다.
  • 관련 테스트 코드를 작성했습니다.
  • 기존 테스트가 모두 통과합니다.
  • 코드 스타일(Spotless, Checkstyle)을 준수합니다.

⌨ 기타

- activeJobsGauge: 실행 중인 Job 수
- jobCompletedCounter/jobFailedCounter: Job 성공/실패 카운터
- partitionCompletedCounter/partitionFailedCounter: 파티션 상태별 카운터
- chunkCounter: 청크 처리 카운터
- stepDurationTimer: Step 실행 시간 히스토그램
- JobResultListener: Job 시작/종료 시 메트릭 업데이트
- PartitionTimingListener: 파티션 완료 시 메트릭 기록
- TimeBasedChunkListener: 청크 완료 시 카운터 증가
@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!

이 Pull Request는 Micrometer를 사용하여 Spring Batch 작업에 대한 포괄적인 모니터링 지표를 도입합니다. 작업 실행 상태, 파티션 진행 상황, 청크 처리 및 스텝 실행 시간을 추적하기 위한 다양한 게이지, 카운터 및 타이머를 설정하여 배치 작업에 대한 가시성을 향상시킵니다.

Highlights

  • 새로운 메트릭 구성 파일 추가: BatchMetricsConfig.java 파일이 새로 추가되어 Spring Batch 작업에 대한 다양한 Micrometer 지표를 정의합니다. 여기에는 활성 작업 게이지, 작업 완료/실패 카운터, 파티션 완료/실패 카운터, 청크 카운터, 스텝 항목 카운터 및 스텝 실행 시간 타이머가 포함됩니다.
  • JobResultListener 업데이트: JobResultListener.java는 활성 작업 게이지, 작업 완료 카운터, 작업 실패 카운터를 주입받아 작업 실행 전후에 해당 지표를 업데이트하도록 수정되었습니다.
  • PartitionTimingListener 업데이트: PartitionTimingListener.java는 파티션 완료/실패 카운터, 스텝 항목 카운터, 스텝 실행 시간 타이머를 주입받아 스텝 실행 후 스텝 상태 및 항목 수에 따라 지표를 업데이트합니다.
  • TimeBasedChunkListener 업데이트: TimeBasedChunkListener.java는 청크 카운터를 주입받아 각 청크 처리 후에 이를 증가시킵니다.

🧠 New Feature in Public Preview: You can now enable Memory 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 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.

@github-actions
Copy link
Copy Markdown

ghost commented Jan 26, 2026

SonarQube Quality Summary (Community)

Quality Gate PASSED

Branch: feat/UPLUS-148
Compared to: default branch

Issues

  • 🐞 Bugs: 0
  • 🔐 Vulnerabilities: 2
  • 📎 Code Smells: 45

Measures

  • Coverage: 0%
  • Duplication: 0%

🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=batch-core&branch=feat/UPLUS-148

Generated automatically by GitHub Actions.

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

이번 PR은 Spring Batch 작업에 대한 다양한 모니터링 지표를 추가하는 것을 목표로 하며, 전반적으로 잘 구현되었습니다. Micrometer를 사용하여 active jobs, job/partition/chunk 카운터, step 실행 시간 등 유용한 지표들을 체계적으로 정의하고 각 리스너에서 적절하게 값을 업데이트하고 있습니다. 다만, JobResultListener에서 Job 실패/성공을 처리하는 로직을 조금 더 단순화하고 중복을 제거할 수 있는 부분이 있어 개선을 제안합니다. 이 부분을 수정하면 코드의 가독성과 유지보수성이 향상될 것입니다.

Copy link
Copy Markdown
Contributor

@arkchive arkchive left a comment

Choose a reason for hiding this comment

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

LGTM!

@swthewhite swthewhite merged commit 195962e into develop Jan 26, 2026
11 checks passed
@swthewhite swthewhite deleted the feat/UPLUS-148 branch January 26, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 새로운 기능 size/M PR size: M style 코드 스타일 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants