Commit ef4c743
Yuriy Bezsonov
feat(perf-platform): add CloudWatch datasource and Latency Metrics dashboard
Replace the perf_profile_cpu_ratio Prometheus alert with an
ALB-based path: Grafana now reads CloudWatch metrics through a
dedicated read-only Pod Identity role, and a "Latency Metrics"
dashboard surfaces ALB p99 TargetResponseTime, request rate, and
5xx error counts for whichever ALB(s) participants deploy. The
ServiceLatency alert rule itself is created by the workshop
chapter (Ch 4) because it depends on the participant-deployed ALB
ARN, which only exists after the unicorn-store-spring workload
rolls out.
CDK
- PerfPlatform construct adds grafana-cloudwatch-pod-role with
cloudwatch:GetMetricData, cloudwatch:GetMetricStatistics,
cloudwatch:ListMetrics, cloudwatch:DescribeAlarms*, tag and ec2
read-only permissions, trusted by pods.eks.amazonaws.com.
perf-platform.sh
- Bind the Grafana ServiceAccount to grafana-cloudwatch-pod-role
via EKS Pod Identity, then restart Grafana so the credential
attaches to a fresh pod.
- Provision the CloudWatch datasource via the Grafana sidecar
ConfigMap pattern (grafana_datasource=1).
- Provision the "Latency Metrics" dashboard via the Grafana
HTTP API directly into the existing "Workshop Dashboards"
folder. The dashboard JSON is embedded in the script as a
heredoc to keep all setup-time provisioning in one file.
- The dashboard uses CloudWatch SEARCH() expressions so it
auto-discovers any ALB tagged with the AWS/ApplicationELB
namespace - no pre-baked LB names, works for both the EKS
ingress ALB and the ECS service ALB once participants deploy.
- Remove the old perf_profile_cpu_ratio Prometheus alert and
the ALERT_RULE_TITLE env var.
- Update the summary block to reflect the new state.
Verified end-to-end on the live cluster: pod identity attached,
CloudWatch datasource shows both ALBs in dimension-values queries,
all four panels render real data under load.1 parent e6daf23 commit ef4c743
2 files changed
Lines changed: 327 additions & 63 deletions
Lines changed: 49 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
133 | 174 | | |
134 | 175 | | |
135 | 176 | | |
| |||
269 | 310 | | |
270 | 311 | | |
271 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
272 | 317 | | |
0 commit comments