Skip to content

[bug] 운영 빌드에서 Sentry 소스맵이 업로드되지 않음 #565

Closed

Description

@s2yeons

문제 요약

운영(Vercel Production) 빌드에서 Sentry 소스맵이 업로드되지 않습니다. 에러는 수집되지만 스택 트레이스가 압축된 코드로만 표시되어 원인 위치를 찾기 어렵습니다.

turbo.json의 client#build.env에 SENTRY_* 변수가 없어서, Turbo 2의 strict env 모드가 빌드 프로세스에 전달되는 Vercel 환경변수 SENTRY_AUTH_TOKEN·SENTRY_ORG·SENTRY_PROJECT를 걸러내는 것으로 보입니다. NEXT_PUBLIC_*는 Turbo의 Next.js framework inference로 자동 통과되기 때문에 DSN 주입과 에러 수집은 정상입니다.

재현 방법

  • 절차:
    1. Vercel Production 환경변수에 SENTRY_AUTH_TOKEN·SENTRY_ORG·SENTRY_PROJECT 등록
    2. main 배포 (2026-10-22, [oneseo] 원서 수정 권한 요청 시간 제한 제거 #563 5ccc31f)
    3. Sentry API로 해당 release의 artifact bundle 조회
  • 기대 결과: release에 소스맵 artifact bundle이 업로드됨
  • 실제 결과: release 5ccc31f는 생성됐지만 artifact bundle 0개 (.env.local을 Next가 직접 읽는 환경에서 빌드된 6618ee5·fc60a14 등은 bundle 260개씩 존재)

재현 빈도

항상 발생

실행 환경 및 참고 자료

  • 배포: Vercel Production (turbo run build, turbo ^2.8.9)
  • @sentry/nextjs 10.69.0
  • 참고: Production에 Sentry 환경변수가 아예 없어서 10/22 이전에는 SDK 자체가 비활성 상태였고, 10/22 환경변수 등록 후 재배포로 에러 수집은 복구됨 (브라우저 → ingest.us.sentry.io envelope 200 확인)
  • 수정안: client#build.env에 SENTRY_DSN·SENTRY_ORG·SENTRY_PROJECT·SENTRY_AUTH_TOKEN 추가

Activity

  1. self-assigned this
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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