Repository navigation
Conversation
LH detail 실패 로그가 KRX trade-info로, LH search 로그가 KRX base-info로, parking-lots 로그가 KRX search로 잘못 귀인되던 문제를 수정하고, 정작 KRX search/base-info/trade-info 라우트에는 귀인 로그가 없던 것을 각 라우트별로 추가했다. 응답 본문은 변경하지 않았다. Refs #641
This was referenced Nov 2, 2026
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.
무엇을 고쳤나
packages/k-skill-proxy/src/server.js의 업스트림 오류 귀인(warn) 로그에서, 실제로 실패한 핸들러와 다른route가 기록되던 문제를 수정합니다./v1/lh-notice/detailcatch:route: "/v1/korean-stock/trade-info"/"KRX upstream error"→route: "/v1/lh-notice/detail"/"LH upstream error"/v1/lh-notice/searchcatch:route: "/v1/korean-stock/base-info"→route: "/v1/lh-notice/search"/"LH upstream error"/v1/parking-lots/searchcatch:route: "/v1/korean-stock/search"→route: "/v1/parking-lots/search"/"parking lots upstream error"/v1/korean-stock/search·base-info·trade-infocatch에는 귀인 로그가 아예 없어서, 각 라우트의 실제route로 warn 로그를 추가응답 status/body는 변경하지 않았습니다(502 계약 유지).
왜
로그의
KRX upstream error중 상당수가 실제로는 LH(다른 업스트림) 요청에서 발생해, 24h 집계에서 KRX 502가 과대집계되고 LH 오류가 KRX로 잘못 귀인됩니다(이슈 #641). routeUsage는 실제 라우트를 기록하므로, 상세 error log의route가 routeUsage의route와 일치해야 합니다.검증 (failing-before → passing-after)
packages/k-skill-proxy/test/server.test.js에 로거 캡처 테스트 4개 추가. 수정 전origin/dev에서 4개 모두 실패, 수정 후 통과:lh-notice detail upstream failure is attributed to /v1/lh-notice/detail, never to KRXexpected a warn log attributed to /v1/lh-notice/detail, got [{"route":"/v1/korean-stock/trade-info",...}]lh-notice search upstream failure is attributed to /v1/lh-notice/searchparking-lots search upstream failure is attributed to /v1/parking-lots/searchkorean stock trade-info upstream failure is attributed to /v1/korean-stock/trade-info(before: 이 라우트는 로그 자체가 없어 실패)로컬:
node --test→ 490 pass / 0 fail / 2 skipped,npm run lint통과.live "before" 관찰 (프로덕션은 아직 이 PR 반영 전)
/v1/lh-notice/search는 동일 시점 HTTP 200으로 정상 동작합니다. 프로덕션 키의SERVICE_KEY_IS_NOT_REGISTERED_ERROR(returnReasonCode 30)는 별도 ops 이슈로 본 PR 범위가 아니며, 502 응답 계약은 그대로 유지됩니다.범위
Refs #641