feat: ALB metrics publishing to CloudWatch and Datadog#166
Merged
Conversation
added 8 commits
April 9, 2026 09:10
Publish ALB rule count and target group count as custom metrics after each deployment to enable continuous monitoring and alerting on ALB quota usage. - Add publish_alb_metrics script supporting CloudWatch and Datadog - Integrate as post-deploy step in initial, switch_traffic, and finalize workflows - Add ALB_METRICS_PUBLISH_ENABLED and ALB_METRICS_PUBLISH_TARGET config - Add .claude/settings.local.json to .gitignore
- CloudWatch: nullplatform/ApplicationELB (mirrors AWS/ApplicationELB) - Datadog: nullplatform.applicationelb.* (mirrors aws.applicationelb.*)
Metrics publishing now only depends on ALB_METRICS_PUBLISH_ENABLED
Move publish_alb_metrics step right after verify_networking_reconciliation so metrics reflect sooner instead of waiting for pods to be ready.
Single line on success, single line on error, silent when disabled.
- Add scope-testing submodule - Add 17 unit tests covering CloudWatch, Datadog, error handling, skip logic, and rule counting across multiple listeners
Keep both ALB capacity validation from beta and metrics publishing.
fedemaleh
reviewed
Apr 10, 2026
fedemaleh
reviewed
Apr 10, 2026
fedemaleh
reviewed
Apr 10, 2026
added 3 commits
April 10, 2026 10:22
Support reading ALB_METRICS_PUBLISH_ENABLED and ALB_METRICS_PUBLISH_TARGET from scope-configurations provider, env vars, or defaults.
fedemaleh
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
publish_alb_metricsscript that publishes ALB rule count and target group count as custom metrics to CloudWatch (nullplatform/ApplicationELB) or Datadog (nullplatform.applicationelb.*)ALB_METRICS_PUBLISH_ENABLEDandALB_METRICS_PUBLISH_TARGETconfigurationMotivation
AWS ALBs have hard limits (100 rules, 100 target groups per ALB) that are not tracked natively by CloudWatch or Datadog. This enables continuous monitoring and alerting before limits are hit.
Configuration
Test plan
bats k8s/deployment/tests/scripts/publish_alb_metrics.bats)nullplatform/ApplicationELBnamespace in kwik-e-mart account