Claude를 떠나지 않고 프로덕션 에러를 처음부터 끝까지 디버그
언제 쓸까: Sentry 알림이 뜨고 지금 당장 근본 원인이 필요할 때.
사전 조건
- Sentry 인증 token — User Settings → Auth Tokens → 'project:read', 'event:read', 'org:read' 권한으로 생성
- 환경 변수에 token 설정 — SENTRY_AUTH_TOKEN과 SENTRY_HOST 설정 (sentry.io 또는 자체 호스팅)
흐름
-
이슈 찾기Use sentry-mcp. Find the most-firing issue in project 'web' from the last 6 hours.✓ 복사됨→ 이슈 ID + 발생 수 + 처음/마지막 발생 시각
-
전체 컨텍스트 조회Get the latest event for that issue — stack trace, breadcrumbs, request data.✓ 복사됨→ 프레임과 사용자 행동 추적이 있는 전체 이벤트 페이로드
-
배포와 연결What release was running when this first appeared? List the commits in that release.✓ 복사됨→ 릴리스 태그 + 커밋 목록
-
수정안 제안Looking at the stack and the commits — which commit likely caused this? Draft a fix in the relevant file.✓ 복사됨→ 특정 파일 + 라인 참조; 구체적인 패치
결과: 완전한 증거 체계와 함께 알림에서 후보 수정안까지 몇 분 만에.
함정
- 소스 맵 없음 — 스택 프레임이 도움 안 됨 — Sentry 릴리스에서 소스 맵 업로드 확인; 없으면 축소된 프레임은 Claude에게 아무 정보도 없음