diff --git a/build.gradle b/build.gradle index 5f1f23c..4e6af90 100644 --- a/build.gradle +++ b/build.gradle @@ -48,6 +48,13 @@ dependencies { // Micrometer Tracing - traceId/spanId 자동 생성 implementation 'io.micrometer:micrometer-tracing-bridge-brave' + // Tempo로 trace export (Zipkin wire format). + // Spring Boot 3.5 BOM이 io.zipkin.reporter2 그룹을 3.5.x 버전으로 관리. + // ("reporter3" 그룹은 존재하지 않음 — 그룹명은 reporter2 유지하고 내부 버전만 v3로 올라옴.) + // - reporter-brave: Brave Span → Zipkin V2 모델 변환 + // - sender-urlconnection: 실제 HTTP POST. Sender 없으면 ZipkinSpanHandler 빈 생성 안 됨 + implementation 'io.zipkin.reporter2:zipkin-reporter-brave' + implementation 'io.zipkin.reporter2:zipkin-sender-urlconnection' // 구조화된 JSON 로깅 implementation 'net.logstash.logback:logstash-logback-encoder:8.0' diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 953ef0f..e813e9f 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -68,6 +68,12 @@ management: tracing: sampling: probability: 1.0 + propagation: + type: b3,w3c # Brave 기본은 b3. w3c도 받아서 OTel 클라이언트 호환 + zipkin: + tracing: + # 같은 web 도커 네트워크의 Tempo. ZIPKIN_ENDPOINT 환경변수로 오버라이드 가능. + endpoint: ${ZIPKIN_ENDPOINT:http://tempo:9411/api/v2/spans} sentry: dsn: ${SENTRY_DSN}