sentry-integrationlisted
Install: claude install-skill AIBiz-Automatyzacje/claude-cron
# Sentry Integration Guidelines
Kompleksowy przewodnik integracji Sentry error tracking i performance monitoring dla projektu React + Supabase Edge Functions.
> **Stan SDK**
>
> - **React SDK:** v10+ (funkcyjne integracje, React 19 error hooks) ✅
> - **Edge Functions:** `@sentry/deno` na Deno 2.x (instrumentacja `Deno.serve` świeża/eksperymentalna + `beforeSend`) ⚠️ — ustaw `defaultIntegrations: false` (dokumentacja Supabase nadal to zaleca na Edge Runtime), używaj `withScope` dla izolacji i `await flush()` przed `Response`
## Table of Contents
- [Critical Rules](#critical-rules)
- [Dobre praktyki (Edge Functions / Supabase)](#dobre-praktyki-edge-functions--supabase)
- [Error Levels](#error-levels)
- [Quick Reference](#quick-reference)
- [Context Enrichment](#context-enrichment)
- [GDPR Compliance](#gdpr-compliance)
- [Checklist dla Nowego Kodu](#checklist-dla-nowego-kodu)
- [Common Mistakes](#common-mistakes)
- [Resources](#resources)
---
## Critical Rules
**NIGDY NIE ŁAMIESZ TYCH ZASAD:**
1. **ALL ERRORS MUST BE CAPTURED TO SENTRY** - w produkcji każdy błąd musi trafić do Sentry
2. **NIGDY `console.error` bez Sentry** - w Edge Functions każdy `console.error` musi mieć `captureError()`
3. **MASKUJ DANE OSOBOWE** - email musi być maskowany: `user@example.com` → `us***@example.com`
4. **NIE WYSYŁAJ WRAŻLIWYCH DANYCH** - hasła, tokeny, klucze API NIGDY nie trafiają do Sentry
5. **UŻYWAJ ODPOWIEDNICH POZIOMÓW** - `fatal` tylko dla krytycznych, `error` dla operacji
---