Skip to content

[feat] PB-122 TRACE-4 Scheduler Trace 구축 - #246

Merged
geonusp merged 3 commits into
mainfrom
feature/trace-scheduler
Sep 7, 2026
Merged

geonusp merged 3 commits into
mainfrom
feature/trace-scheduler

Conversation

@PHJ2000

@PHJ2000 PHJ2000 commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

🔗 이슈 링크

🧩 변경사항

  • BeachConditionScheduler 실행마다 독립적인 scheduler.beach-condition.refresh root span 생성
  • 해변 item마다 scheduler.beach-condition.item span 생성
  • item 결과를 success, skipped, error로 기록하고 skip 사유를 missing_code, no_response로 제한
  • 기존 RestClient/JDBC 자동 계측을 수동 span으로 중복 생성하지 않고 job/item 현재 span의 자식으로 연결
  • 처리되지 않은 예외는 job/item을 ERROR로 기록한 뒤 원본 예외를 그대로 전파
  • 기존 schedulerName/jobId MDC와 Trace MDC scope를 정상·예외 종료 후 정리
  • span error에는 일반화된 메시지만 기록하고, 코드 없는 해변 경고에서 beachId 원문 제거
  • API, DB schema, cron, 저장 정책 변경 없음

✅ 이 PR이 커버하는 AC

  • AC1~AC6: job/item span, bounded outcome, 부모 관계, error 전파, 민감정보 비수집, MDC/Trace 정리
  • AC7: 기존 Scheduler 분기 테스트와 in-memory exporter 기반 통합 테스트 추가
  • AC8: dev Tempo/log의 실제 Scheduler Trace 검증은 merge 후 별도 runtime gate

🧪 검증

  • ./gradlew test --tests '*BeachConditionSchedulerTest' --no-daemon
  • ./gradlew test --tests '*BeachConditionSchedulerTracingIntegrationTest' --no-daemon
  • ./gradlew check --no-daemon --stacktrace
  • spotlessCheck, checkstyleMain, checkstyleTest

모든 로컬 검증 통과.

💬 리뷰 포인트

  • Scheduler는 HTTP 요청에서 시작되지 않으므로 job span은 setNoParent()로 명시적인 root로 생성
  • TRACE-2에서 제공하는 RestClient/JDBC 자동 span만 사용하고 Scheduler 경계 span만 수동 생성
  • 예외 원문은 URL/query/code가 포함될 수 있어 span에는 안전한 메시지만 기록하며, 호출자에게는 원본 예외를 재전파
  • 이슈는 dev Tempo/log runtime 확인 후 수동 종료하도록 Closes #240은 사용하지 않음

선행: TRACE-1 PR #236/#237, TRACE-2 PR #245

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 34fa08af-174a-4080-befc-1099ce642bd9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PHJ2000
PHJ2000 marked this pull request as draft August 29, 2026 08:00
@PHJ2000
PHJ2000 marked this pull request as ready for review September 5, 2026 14:53

@geonusp geonusp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

따로 문제가 될만한 게 없어 보입니다.

@geonusp
geonusp merged commit 0bc7630 into main Sep 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants