fix(messaging): publishToAi 시 traceId MDC 누락 시 새 UUID 자동 생성#39
Merged
Conversation
운영 검증 중 발견. callback handler 흐름에서 자동 발화된 SessionEndedEvent →
SessionFeedbackRequester.publishToAi 호출 시 MDC 에 traceId 가 없어 envelope.traceId=null
로 발행. AI 측 Envelope[T] 의 traceId 가 string required 라 Pydantic ValidationError
('Input should be a valid string [...] input_value=None') 로 메시지 거절.
해결: publishToAi 내부에 fallback — MDC traceId null/blank 면 UUID.randomUUID() 채움.
JwtAuthenticationFilter 흐름은 MDC 가 채워져 있고, RabbitListener/TransactionalEventListener
흐름은 이 fallback 으로 균일하게 traceId 보장.
증상: 운영 골든패스 (Sprint3 verify, sessionId=4) 에서
- SessionFeedbackRequester: generate.feedback published. (정상)
- feedback consumer: feedback.parse.failed traceId: Input should be a valid string
- /api/sessions/4/feedback 무한 FEEDBACK_NOT_READY
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
운영 검증 중 발견. callback handler 흐름에서 자동 발화된 SessionEndedEvent → SessionFeedbackRequester.publishToAi 호출 시 MDC 에 traceId 가 없어 envelope.traceId=null 로 발행. AI 측 Envelope[T] 의 traceId 가 string required 라 Pydantic ValidationError ('Input should be a valid string [...] input_value=None') 로 메시지 거절.
해결: publishToAi 내부에 fallback — MDC traceId null/blank 면 UUID.randomUUID() 채움. JwtAuthenticationFilter 흐름은 MDC 가 채워져 있고, RabbitListener/TransactionalEventListener 흐름은 이 fallback 으로 균일하게 traceId 보장.
증상: 운영 골든패스 (Sprint3 verify, sessionId=4) 에서
변경 사항