Repository navigation
[FEAT/#487] 커스텀 도메인 메트릭 · 운영 Discord 알림 추가 - #490
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
- InquiryServiceImpl에 inquiry.created Counter 추가 (문의 생성 시 증가) - StudentServiceImpl에 student.usable.queried Counter 추가 (사용 가능 제휴 조회 시 증가) - DeviceTokenServiceImpl에 device.token.registered Counter 추가 (신규 토큰 등록 시 증가) - DeviceTokenServiceImpl에 device.token.deleted Counter 추가 (토큰 비활성화 시 증가) - 쓰기 트랜잭션 내 카운터는 afterCommit 패턴 적용으로 롤백된 작업 미집계
- student.usable.queried Counter 제거 (조회 횟수 집계 불필요) - syncUserPapersForStudent에 동기화 결과 로그 추가 (studentId, synced 건수) - syncUserPapersForStudent를 REQUIRES_NEW 전파로 변경하여 실패 시 독립 롤백
- syncUserPapersForStudent 호출부를 try-catch로 감싸 동기화 실패가 회원가입에 영향 없도록 처리 - 동기화 실패 시 log.error로 studentId와 예외 기록
- DiscordNotifier 컴포넌트 추가 (infra/discord) - InquiryServiceImpl: 문의 생성 후 afterCommit 시점에 Discord #서비스-알림 채널로 알림 전송 - ProfileImageServiceImpl: 이전 프로필 이미지 S3 삭제 실패 시 member.profile.image.s3.delete.failure 카운터 증가 - config/prod: discord.webhook.service-alert URL 추가
- DiscordNotifier에 sendReportAlert, sendSignupPendingAlert 메서드 추가 - ReportServiceImpl: reportContent/reportStudent 저장 후 afterCommit으로 Discord 알림 발송 - SignUpServiceImpl: signupPartner(제휴업체)/signupAdmin(학생회) 신규 가입 시 afterCommit으로 Discord 알림 발송 (복구 케이스 제외)
- DiscordNotifier에 처리 완료 알림 메서드 6종 추가 - BackofficeInquiryServiceImpl: 문의 답변 완료 시 Discord 알림 - BackofficeReportServiceImpl: 신고 상태 변경·콘텐츠 삭제·기각 시 Discord 알림 - BackofficeMemberServiceImpl: 제휴업체/학생회 가입 승인·거절 시 Discord 알림 - 모두 afterCommit 패턴 적용
leesumin0526
force-pushed
the
feat/#487-add-domain-metrics
branch
from
October 5, 2026 09:53
17e40d5 to
9e50aae
Compare
2ghrms
approved these changes
Oct 6, 2026
- 알림 종류별 메서드 제거 후 send(String)을 public으로 변경 - 각 서비스에서 알림 메시지를 직접 전달하도록 수정
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
📝작업 내용
🔎코드 설명(스크린샷(선택))
커스텀 메트릭 (Micrometer Counter)
inquiry.createddevice.token.registereddevice.token.deletedmember.profile.image.s3.delete.failureafterCommit패턴 적용 (롤백 시 카운터 증가 방지)UserPaper 동기화 버그 수정
syncUserPapersForStudent가REQUIRED전파로 회원가입 트랜잭션에 합류 → 동기화 실패 시 회원가입 전체 롤백REQUIRES_NEW로 별도 트랜잭션 분리 +SignUpServiceImpl에서 try-catch로 예외 흡수 → 동기화 실패해도 회원가입은 성공Discord 알림 (
DiscordNotifier)이벤트 접수 시:
InquiryServiceImpl.create()커밋 후ReportServiceImpl.reportContent/reportStudent()커밋 후SignUpServiceImpl.signupPartner/signupAdmin()커밋 후 (복구 케이스 제외)처리 완료 시:
BackofficeInquiryServiceImpl.answer()커밋 후BackofficeReportServiceImpl.updateReportStatus()커밋 후BackofficeReportServiceImpl.softDeleteReview/Suggestion()커밋 후BackofficeReportServiceImpl.rejectReport()커밋 후BackofficeMemberServiceImpl.approveMember()커밋 후BackofficeMemberServiceImpl.rejectMember()커밋 후afterCommit패턴 적용 (트랜잭션 롤백 시 알림 미발송)💬고민사항 및 리뷰 요구사항 (Optional)
runAfterCommit헬퍼가InquiryServiceImpl,BackofficeInquiryServiceImpl,ReportServiceImpl,BackofficeReportServiceImpl,BackofficeMemberServiceImpl,DeviceTokenServiceImpl,SignUpServiceImpl에 각각 중복 선언되어 있음. 공통 유틸로 추출하는 것을 고려할 수 있으나 현재 범위에서는 보류signupBatchPartner는 운영자가 직접 실행하는 배치 작업이므로 Discord 알림 미적용비고 (Optional)
config/prod/application-prod.yml의discord.webhook.service-alert에 설정