feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) #643

Merged
Light1YT merged 1 commit from feat/396-glitchtip-integrations into main 2026-05-29 09:23:17 +00:00

1 commit

Author SHA1 Message Date
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