Skip to content

Sentry + GlitchTip Slow DB Query Plan

Migrated from root technical docs.

Status: Active Last updated: 2026-04-24 Owner: Platform + App teams

This folder contains the remaining implementation tickets for slow database query observability using existing Sentry-compatible GlitchTip instrumentation.

  • Enable performance tracing safely in Cloudflare/server runtimes.
  • Record DB query spans with useful metadata and redaction-safe query identifiers.
  • Detect slow-query events with a consistent threshold policy.
  • Build GlitchTip views and alerts that are actionable.
  • Add tests and rollout controls so overhead/cost stays predictable.
  • Full SQL optimization pass across all endpoints.
  • Automatic index recommendations.
  • Browser performance tracing (unless explicitly enabled later).
  1. TKT-005: GlitchTip dashboards, alerts, runbook
  2. TKT-006: Tests, staged rollout, ratchet
  • Complete TKT-005
  • Complete TKT-006
  • Tracing sample rate is configurable by environment and defaults to safe values.
  • DB spans include operation, shard, duration, and redacted query fingerprint.
  • Slow-query threshold tagging works consistently across instrumented services.
  • GlitchTip has at least one saved slow-query view and one active alert (manual GlitchTip config).
  • Unit/integration tests cover key helper logic and critical instrumentation paths.
  • Rollout and rollback steps are documented and tested in production (runbook published; production validation pending).