Observability
Logs
| Log group | Contents |
|---|---|
|
HTTP requests, view errors, |
|
Async tasks, stream batches, the cleanup run ( |
API Gateway execution logs |
Not enabled; turn on per stage when debugging routing. |
Both Lambda log groups are resources of the stack (ApiLogGroup, WorkerLogGroup), wired to the
functions through LoggingConfig. Retention is LogRetentionDays in the Env mapping: 90 days
in prod, 14 on stage. Deleting the stack deletes them.
|
If |
The root log level is LOG_LEVEL (ERROR in prod, WARNING on stage), set in
lambda_handlers.py. Tail both functions at once:
sam logs --stack-name actionstools-prod --profile prod --tail
sam logs --stack-name actionstools-prod --profile prod -n WorkerFunction --filter ERROR -s '1h ago'
Errors
Sentry (Sentry) receives log records at WARNING+ that also pass
LOG_LEVEL — so ERROR+ in production — from both functions, tagged with environment =
production / staging. Async-task failures carry the message prefix
Error when sending notifications in background; stream failures Error when calculating counters.
Metrics worth an alarm
| Metric | Function | Meaning |
|---|---|---|
|
both |
Unhandled exceptions / concurrency limits. |
|
API |
Slow downstream (internal API, event logger, messaging). |
|
Worker |
The tasks stream is falling behind; counters are stale. |
|
Worker |
Async tasks discarded after failure or age — notifications lost. |
|
|
What users see. |