Merged
Conversation
sudo-Terry
reviewed
Jul 2, 2025
Comment on lines
+26
to
+30
| if (handler instanceof HandlerMethod handlerMethod) { | ||
| log.info("REQUEST [{}][{}][{}]", logId, requestURI, handlerMethod.getMethod().getName()); | ||
| } else { | ||
| log.info("REQUEST [{}][{}][{}]", logId, requestURI, handler); | ||
| } |
Member
There was a problem hiding this comment.
경험적으로 클라이언트를 식별할 수 있는 clientIp와 같은 사용자 식별 정보가 로그에 찍히지 않으면 불편하더라구요.
실제 서비스가 올라가게 되면 로그 데이터가 방대하게 쌓이게 되어 필요한 로그를 찾기 어려웠습니다.
지금 수준의 기록으로는 응답 지연의 정도를 확인하거나 트래픽을 확인하는 정도로만 활용이 가능할 것 같아요
Contributor
Author
There was a problem hiding this comment.
사용자를 구분하고자 쿼리 파라미터로 전달되는 memberId 값을 읽어와서 로그에 추가하도록 수정했습니다~
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.
API 요청에 UUID를 부여하고, 요청을 응답하는데 걸리는 시간을 로그로 남기는 간단한 스프링 인터셉터를 추가해보았습니다.