Skip to content

Integrate Sentry/GlitchTip error tracking with plugin-aware grouping #202

Description

@tayebmokni

Summary

Integrate Sentry-protocol error tracking (default backend recommendation: GlitchTip self-host; Sentry self-hosted also supported). Captures recovered panics, slog.Error lines with an err attribute, plugin traps with WASM-specific tags, and front-end uncaught errors / rejected promises.

Design reference

  • docs/10-observability.md §8 (Error tracking)

Acceptance criteria

  • github.com/getsentry/sentry-go wired; enabled when SENTRY_DSN or GLITCHTIP_DSN env var set
  • Custom slog.Handler mirrors ERROR lines with err attribute to Sentry
  • Recovered panic middleware captures with trace_id and request_id tags
  • Plugin error capture with tags: plugin.slug, plugin.version, hook.name, wasm.trap.kind, wasm.fuel_used, wasm.fuel_remaining, wasm.memory_pages
  • Plugin fingerprint override: plugin:<slug>:<trap-kind> (one issue per failure mode)
  • DB error fingerprint includes query_name not raw SQL
  • before_send hook re-runs PII redactor on exception extras
  • Rate-limited per (plugin, trap-kind) at 1/s
  • attach_stacktrace: true, send_default_pii: false
  • Next.js error tracking via @sentry/nextjs for both public + admin
  • Source maps: hidden-source-map for Next builds, uploaded then deleted from public bundle

Dependencies

#145, #186

Complexity

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions