hibernate 메트릭 수집 활성화 - #812
Hidden character warning
Conversation
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
문제
PR #807에서
hibernate.generate_statistics: true를 추가했지만, 배포 후 운영에서 확인한 결과hibernate_*메트릭이 하나도 수집되지 않고 있었습니다.hikaricp_,jvm_,http_server_requests_등 나머지 지표는 정상이었습니다.원인
Spring Boot 3.4.1의
HibernateMetricsAutoConfiguration조건을 바이트코드로 확인했습니다.org.hibernate.stat.HibernateMetrics는 Micrometer의 클래스(io.micrometer.core.instrument.binder.jpa.HibernateMetrics)가 아니라 Hibernate 쪽hibernate-micrometer아티팩트의 클래스입니다. 이 아티팩트는hibernate-core에 포함되지 않는 별도 의존성이라 클래스패스에 없었고, 그 결과 auto-configuration 전체가 조용히 건너뛰어졌습니다.generate_statistics: true만 켜둔 상태였으므로 통계 수집 비용은 지불하면서 지표는 얻지 못하는 상황이었습니다.수정
RomRom-Web/build.gradle에org.hibernate.orm:hibernate-micrometer추가. 버전은 Spring Boot BOM이 관리하며hibernate-core와 동일한6.6.4.Final로 해석됩니다.검증
ConfigBindingTest에 실제 수집 여부를 단언하는 테스트를 추가했습니다. 실기동 통합 테스트라 관리자 인증 후/actuator/prometheus응답 본문을 직접 확인합니다.뮤테이션 검증 수행: 의존성을 주석 처리하고 재실행하면 새 테스트만 정확히 실패합니다. 이 테스트가 실제로 회귀를 잡는다는 것을 확인했습니다.
배경
이 문제는
generate_statistics설정만으로는 드러나지 않습니다. 설정은 정상 반영됐고(배포본 jar에서 확인), 라이브러리도 있었지만, auto-configuration의 조건 클래스 하나가 빠져 지표만 조용히 사라졌습니다. 배포 후 실제 메트릭 응답을 눈으로 확인하지 않았다면 발견하지 못했을 종류의 문제입니다.