You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(elasticloadbalancingv2): specific 5XX CloudWatch metrics for ALB (#30659)
### Reason for this change
ALB supports metrics for specific load balancer generated 5XX level error metrics.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-cloudwatch-metrics.html
However, they are currently not included in `HttpCodeElb`, so the `metrics.httpCodeElb` method is not available and `metrics.custom` must be used.
```ts
let alb: IApplicationLoadBalancer;
alb.metrics.httpCodeElb(HttpCodeElb.ELB_5XX_COUNT); // we can do this
alb.metrics.httpCodeElb(HttpCodeElb.ELB_500_COUNT); // currently we cannot do this
alb.metrics.custom("HTTPCode_ELB_500_Count");
```
Adding the metric names to `HttpCodeElb` makes it easier to understand as it can be configured in the same way as `HTTPCode_ELB_5XX_Count`.
### Description of changes
Add metrics names to `HttpCodeElb`.
### Description of how you validated changes
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments