Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(be): add user info and request id for logging #1207

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

SH9480P
Copy link
Member

@SH9480P SH9480P commented Jan 18, 2024

Description

closes #1174

request 객체에 user id과 request id를 추가하여 로그 분석 시 용이하도록 합니다.

user id는 로그인이 된 사용자에 한해서 확인 가능합니다.
request id는 모든 요청에 대해 부여됩니다. Cryto.randomUUID()를 사용하여 부여합니다.

Additional context


Before submitting the PR, please make sure you do the following

http request log에 대해 인증된 사용자의 경우 user id와 username을 추가한다.
@SH9480P SH9480P self-assigned this Jan 18, 2024
@SH9480P SH9480P linked an issue Jan 18, 2024 that may be closed by this pull request
3 tasks
Copy link

vercel bot commented Jan 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
codedang ✅ Ready (Inspect) Visit Preview Jan 18, 2024 6:35am

@SH9480P SH9480P merged commit 5ed5653 into main Jan 18, 2024
10 checks passed
@SH9480P SH9480P deleted the 1174-add-requestId-and-userId-to-logger branch January 18, 2024 07:30
SH9480P added a commit that referenced this pull request Jan 24, 2024
* feat: add user info to pino-http

http request log에 대해 인증된 사용자의 경우 user id와 username을 추가한다.

* feat: add request id to request and response
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.

Nestjs Logger에 request ID 및 User ID 추가하기
2 participants