However, they are currently not included in HttpCodeElb, so the metrics.httpCodeElb method is not available and metrics.custom must be used.
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.
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 themetrics.httpCodeElb
method is not available andmetrics.custom
must be used.Adding the metric names to
HttpCodeElb
makes it easier to understand as it can be configured in the same way asHTTPCode_ELB_5XX_Count
.Description of changes
Add metrics names to
HttpCodeElb
.Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license