Skip to content

Cut CloudWatch log noise and set 30-day log retention - #12

Merged
jzongker-churchapps merged 1 commit into
mainfrom
chore/reduce-cloudwatch-noise
Nov 7, 2026
Merged

jzongker-churchapps merged 1 commit into
mainfrom
chore/reduce-cloudwatch-noise

Conversation

@jzongker-churchapps

Copy link
Copy Markdown
Contributor

Why

Most of this service's CloudWatch volume is Lambda START/END/REPORT lines plus a dotenv advert on every cold start, which buries real warnings and errors. Log groups also never expire. Same change as ChurchApps/Api#432.

Changes

  • Lambda advanced logging on every function (LogFormat: JSON, ApplicationLogLevel: INFO, SystemLogLevel: WARN) via resources.extensions (Serverless v3 has no provider.logs.lambda). New functions need adding there.

  • dotenv.config({ quiet: true }): removes the ◇ injected env (0) from .env // tip: … line.

  • logRetentionInDays: 30.

Heads-up

  • Log lines become JSON; saved Logs Insights queries matching the old tab format need updating (level, message, requestId).
  • Per-invocation REPORT lines go away; CloudWatch Lambda metrics are unaffected.

Pre-merge checks

  • Malware/obfuscation review: org PolinRider scanner passes; no eval/Function/fromCharCode/_0x/base64 blobs, whitespace-padded lines, non-npm deps, unexpected lifecycle scripts, or binary/font files.
  • tsc --noEmit clean, eslint clean on changed files, tests pass.

🤖 Generated with Claude Code

- Lambda advanced logging (JSON, app INFO, system WARN) on every function via
  resources.extensions; drops per-invocation START/END/REPORT lines.
- dotenv.config({ quiet: true }) to stop the promotional "tip" line on every cold start.

- provider.logRetentionInDays: 30 (log groups were never-expire).

Same approach as ChurchApps/Api#432.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jzongker-churchapps
jzongker-churchapps merged commit 0f86c36 into main Nov 7, 2026
1 check passed
@jzongker-churchapps
jzongker-churchapps deleted the chore/reduce-cloudwatch-noise branch November 7, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant