Skip to content

[FEAT] API 호출 시 상세 로깅 기능 추가 #28

@na-rong

Description

@na-rong

✨ 기능 설명

userservice에 대해 모든 API 호출 시 응답 시간, HTTP 메서드, API 이름, 클라이언트 IP 등과 같은 정보를 기록하는 기능 추가.
주요 API: 로그인, 회원가입, 토큰 재발급, 사용자 조회, 로그아웃 등.

☑️ 작업 상세 내용

  • 모든 API 호출 시 로그 기록 추가
    • http_method
    • api_name
    • client_ip
    • response_time_ms
    • uri
    • api_path
    • status
  • AOP를 활용하여 공통 로깅 로직 적용
  • UserLoggingAspect 클래스 개선
    • 로그인, 회원가입, 토큰 재발급, 사용자 조회, 로그아웃 API의 호출 로그 기록.

📎 참고할만한 자료

  • 로그 메시지 JSON 포맷:
    {
      "http_method": "POST",
      "api_name": "AuthController.login",
      "client_ip": "192.168.0.1",
      "response_time_ms": 120,
      "request_id": "abcd-1234-efgh-5678",
      "uri": "/api/v1/users/auth/login",
      "api_path": "/api/v1/users/auth/login",
      "timestamp": "2024-12-04T19:15:00.123+00:00",
      "status": "success"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions