CloudWatch & Sentry
Log Groups
| Log Group | Source |
|---|---|
/aws/ec2/statux-prod | EC2 instance logs |
/aws/ec2/statux-prod-platform-api | Platform API container logs |
Per-product log groups retired
The old per-product API log groups (statuspages/alerting/synthetics/insights) were retired with the C5/D5/E5 folds. Divinux container logs are read via SSM docker logs on the running instances (see the Incident Response runbook).
View Logs
# Follow logs for a specific API
# Per-product log groups retired post-folds; use SSM docker logs instead (incident-response runbook)
# Search for errors
aws logs filter-log-events \
--log-group-name <retired — folds moved app logs to SSM docker logs> \
--filter-pattern "ERROR"
You can also view container logs directly on the EC2 instance:
# SSH via SSM, then:
sudo docker logs --tail 100 <container-id> 2>&1 | grep -i error
CloudWatch Alarms
| Alarm | Threshold | Action |
|---|---|---|
| ASG Max Capacity | >= 2 instances | SNS notification |
| SES Bounce Rate | > 5% | SNS notification |
| SES Complaint Rate | > 0.1% | SNS notification |
Sentry Error Tracking
Both APIs (Divinux and Platform) report 500+ errors to Sentry automatically:
- Sentry project:
allstatux(single project for all APIs) - How it works:
HttpExceptionFilter(applied globally) callscaptureException()for any error with status >= 500, including request context (URL, method, user ID) - Initialization: Each API calls
initSentry()inmain.tswith the DSN from Secrets Manager
Sentry Dashboard
View errors, stack traces, and trends at the Sentry web dashboard. Errors are tagged with the service name (divinux-api, platform-api) for filtering.
When to Use What
| Scenario | Tool |
|---|---|
| Application errors (500s, exceptions) | Sentry |
| Container startup issues, crashes | CloudWatch Logs |
| Infrastructure metrics (CPU, memory) | CloudWatch Metrics |
| Email delivery issues | CloudWatch Alarms (SES bounce/complaint) |
| API request debugging | CloudWatch Logs + Sentry |
SES Monitoring
AWS SES email delivery is monitored via CloudWatch:
- Bounce rate alarm triggers if bounces exceed 5% (SES suspension risk at 10%)
- Complaint rate alarm triggers if complaints exceed 0.1% (SES suspension risk at 0.5%)
- SES configuration set
statux-production-v2routes delivery events to CloudWatch