gendesign/tradein-mvp/backend/app/observability
Light1YT ac533812c2 feat(tradein): enrich GlitchTip SDK init with integrations + PII scrub (#396)
The tradein GlitchTip init was barebones (dsn/environment/traces/pii only) —
no integrations, so FastAPI request errors and logged ERRORs were not
auto-captured. Enrich it so real error monitoring works once GLITCHTIP_DSN
is set:
- integrations: Starlette, FastApi (request errors), SQLAlchemy, Httpx
  (breadcrumbs), Logging(level=INFO, event_level=ERROR → logger.error events)
- release tag (GIT_SHA / SENTRY_RELEASE / "unknown")
- before_send=scrub_pii_event — redacts consumer PII (client_name/phone/email)
  from error event bodies (request.data / extra / contexts), beyond what
  send_default_pii=False covers
- NO CeleryIntegration (prod runs no celery worker; in-app scheduler)

Guard preserved: full no-op while GLITCHTIP_DSN is empty (current prod) →
safe to deploy now; activates when an operator sets the DSN.

Closes #396
2026-05-29 14:22:07 +05:00
..
__init__.py feat(tradein): enrich GlitchTip SDK init with integrations + PII scrub (#396) 2026-05-29 14:22:07 +05:00
sentry_scrub.py feat(tradein): enrich GlitchTip SDK init with integrations + PII scrub (#396) 2026-05-29 14:22:07 +05:00