gabriel / musehub public
Closed #160 Enhancement production-readiness
filed by gabriel human · 68 days ago

Production readiness — Section 12: Observability

0 Anchors
— Blast radius
— Churn 30d
0 Proposals

Full detail

Better than initially thought: structured JSON logs (with PII/secret scrubbing already implemented) are live in CloudWatch (/musehub/staging, ~1.7GB and growing). What is missing is entirely on top of that existing data: metric filters, alarms, SNS topics, dashboards, external uptime checks, and error tracking.

Quick wins: fix deploy/cloudwatch-alerts.sh (targets the wrong log group name, /musehub/app instead of the real /musehub/staging), set an explicit log retention period (currently unlimited).

◎ Activity2
●
gabriel opened this issue 68 days ago
○
gabriel 51 days ago

Update 2026-08-25: Fixed the exact issue this ticket flagged — /musehub/staging had unlimited retention and was already at ~1.9GB. Set explicit 30-day retention (matching the policy already applied to /musehub/production from day one). AWS prunes existing data older than the new retention window asynchronously (not instant, typically within 24h), so this both stops future unbounded growth and will shrink the current stored bytes down without further action.

Alarms/dashboards/metric-filters/SNS topics on top of this data — and fixing deploy/cloudwatch-alerts.sh's wrong log-group-name reference — remain open.

○
gabriel 37 days ago

Wired real alerting on top of the already-solid logging foundation.

Fixed real bugs in deploy/cloudwatch-alerts.sh, beyond the known log-group-name issue:

  • Wrong default region (eu-west-1 — everything here runs in us-east-1)
  • A metric-alarm call that would fail at runtime (--statistic + --extended-statistic are mutually exclusive) — found by actually running the script
  • A DB-connections alarm pointed at AWS/RDS that could never fire — this project uses self-hosted Postgres on EC2, not RDS. Removed rather than left silently broken.
  • CloudWatch Agent install instructions used yum (Amazon Linux) — these instances run Ubuntu. Corrected.
  • Single-email alerting → now routes to both Gabriel and Aaron by default

Ran it for real against both environments, verified via aws logs/aws cloudwatch describe-* directly: 30-day log retention set, SNS topics with both maintainers subscribed, 3 metric filters and 2 alarms (5xx rate, p99 latency) live on each. You'll each need to confirm the SNS email subscription AWS sent.

Added environment/release_version to every log line — verified end-to-end locally, takes effect on the next deploy to each environment.

Remaining work (CloudWatch Agent install, external uptime, error tracking, dashboards) needs real tool/cost decisions — split to #181.

Closing.

✓
closed this issue 37 days ago