Conversation
Discord error-webhook을 Sentry Node SDK로 교체하여 구조화된 에러 추적 구현. - @sentry/node SDK 초기화 (sendDefaultPii: false, PII 스크러빙) - beforeSend에서 DB URL, Discord 토큰, JWT 마스킹 - bot.ts, index.ts, job-queue.ts, api-server.ts, scheduler-registry.ts에 Sentry.captureException 적용 - process.exit 전 Sentry.flush(2000) 호출로 이벤트 전달 보장 - error-webhook.ts 삭제, env.ts에서 DISCORD_ERROR_WEBHOOK_URL 제거 - CLAUDE.md, ARCHITECTURE.md 봇 Sentry 반영 Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Discord error-webhook을 Sentry Node SDK로 교체하여 웹과 동일한 구조화된 에러 추적 체계 구축.
Changes
packages/bot/src/lib/sentry.tssendDefaultPii: false, DB URL/토큰/JWT 마스킹)packages/bot/src/lib/error-webhook.tspackages/bot/src/bot.tsreportError()→Sentry.captureException(), shutdown 시Sentry.flush()packages/bot/src/index.tsmain().catch에서Sentry.captureException+flushpackages/bot/src/job-queue.tsSentry.captureException추가packages/bot/src/api-server.tsSentry.captureException추가packages/bot/src/scheduler-registry.tsSentry.captureException추가packages/shared/src/config/env.tsDISCORD_ERROR_WEBHOOK_URL→SENTRY_DSN(optional)packages/bot/package.json@sentry/node의존성 추가.env.exampleDISCORD_ERROR_WEBHOOK_URL제거,SENTRY_DSN추가CLAUDE.mddocs/ARCHITECTURE.mdDesign Decisions
sendDefaultPii: falsebeforeSend에서 DB URL/토큰 스크러빙Test Plan
SENTRY_DSN설정 후 봇 시작 → Sentry 이벤트 수신 확인SENTRY_DSN미설정 +NODE_ENV=production→ 콘솔 경고 출력 확인🤖 Generated with Claude Code