feat(frontend): @sentry/nextjs init для GlitchTip (#204 frontend) #208
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#208
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/204-glitchtip-frontend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
@sentry/nextjs@10.53.1для отправки frontend-ошибок в self-hosted GlitchTip (errors.gendsgn.ru)NEXT_PUBLIC_GLITCHTIP_DSNне задан (no-op в локальной разработке)replaysSessionSampleRate: 0) — GlitchTip не поддерживает ReplayGLITCHTIP_AUTH_TOKEN(CI builds); без токена upload молча пропускаетсяEnv vars
NEXT_PUBLIC_GLITCHTIP_DSNGLITCHTIP_AUTH_TOKENSENTRY_ORGSENTRY_PROJECTSENTRY_URLTest plan
npx tsc --noEmit— чистоnpm run buildбез DSN — собирается (SDK no-op).env.local— ошибка в браузере должна появляться в GlitchTipCloses #204
Empty PR — nothing to review
Head SHA
256909d2совпадает с base SHA — branch не содержит коммитов.additions: 0,deletions: 0,changed_files: 0PR body описывает
@sentry/nextjs@10.53.1init для frontend, но реальных изменений нет.Possible causes:
Action: worker должен push'нуть commits в
feat/204-glitchtip-frontendветку, либо close PR если работа не начата.- Add @sentry/nextjs@10.53.1 - sentry.{client,server,edge}.config.ts — GlitchTip-compatible init (no Replay, tracesSampleRate=0.05, guarded on DSN presence) - src/instrumentation.ts — register() + captureRequestError export - next.config.ts — wrapped in withSentryConfig (v10 API: treeshake.removeDebugLogging, sourcemaps.deleteSourcemapsAfterUpload) - .env.example — NEXT_PUBLIC_GLITCHTIP_DSN + SENTRY_* vars - .gitignore — .sentryclirc exclusionPrevious run created PR but never pushed commits — fixed. All files now present:
Ready for re-review.
Code Review verdict — PR #208
Summary
package-lock.jsonregen)653e74fA. Security 🔒
process.env.*.env.exampleбез значений, документирует все 5 env vars.gitignoreдополнен.sentryclircиfrontend/.sentryclirc— auth-token leak preventedauthToken: process.env.GLITCHTIP_AUTH_TOKEN(undefined → silent skip)sourcemaps.deleteSourcemapsAfterUpload: true— maps не сервятся публичноB. Correctness 🎯
sentry.{client,server,edge}.config.tsоборачиваетSentry.initвif (dsn) { ... }replaysSessionSampleRate: 0,replaysOnErrorSampleRate: 0,integrations: [](client)GLITCHTIP_DSN ?? NEXT_PUBLIC_GLITCHTIP_DSN(server-side env совместим с backend PR #207)instrumentation.tsкорректно gate'ит поNEXT_RUNTIME === "nodejs" | "edge"instrumentation.ts:9-10использует top-levelawait import("@sentry/nextjs")дляonRequestError. Работает в Next.js 15 ESM, но загружает модуль даже без DSN. Каноничный шаблон Sentry — обычныйimport { captureRequestError }. Можно поправить в follow-up, не блокер.C. Performance ⚡
tracesSampleRate: 0.05(5%) — разумно для продSentry.initне вызывается, нет runtime overheadwidenClientFileUpload: true+webpack.treeshake.removeDebugLogging: true— bundle остаётся компактнымtunnelRoute: undefined— explicit no-tunnel (GlitchTip без CORS proxy)D. Conventions 📋
anyuseEffectдля fetch (irrelevant — нет React data fetching)frontend/— соответствует контракту@sentry/nextjs≥9withSentryConfigобёртка корректна — сохраняет существующиеimages/rewrites/redirects/headersE. Backward compat
next.config.tsсохраняет всю существующую логику, только wrap'нул сwithSentryConfigpackage-lock.jsonregenerated — ожидаемо для нового depsCross-file impact (#205 / #207 / #208)
Env var contract согласован между всеми PR:
GLITCHTIP_DSNNEXT_PUBLIC_GLITCHTIP_DSNGLITCHTIP_AUTH_TOKENSENTRY_ORG/PROJECT/URL.env.example)Порядок мержа не критичен — все SDK no-op без DSN.
Auto-merge policy
✅ APPROVE без critical issues → squash-merge per user override 2026-05-16.