Skip to main content

CloudWatch & Sentry

Log Groups

Log GroupSource
/aws/ec2/statux-prodEC2 instance logs
/aws/ec2/statux-prod-platform-apiPlatform 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

AlarmThresholdAction
ASG Max Capacity>= 2 instancesSNS 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) calls captureException() for any error with status >= 500, including request context (URL, method, user ID)
  • Initialization: Each API calls initSentry() in main.ts with 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

ScenarioTool
Application errors (500s, exceptions)Sentry
Container startup issues, crashesCloudWatch Logs
Infrastructure metrics (CPU, memory)CloudWatch Metrics
Email delivery issuesCloudWatch Alarms (SES bounce/complaint)
API request debuggingCloudWatch 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-v2 routes delivery events to CloudWatch