Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(elbv2): add metrics to INetworkLoadBalancer and IApplicationLoadBalancer #23853

Merged
merged 3 commits into from
Jan 31, 2023

Commits on Jan 30, 2023

  1. feat(elbv2): add metrics to INetworkLoadBalancer and IApplicationLoad…

    …Balancer
    
    By moving the metrics methods to the `INetworkLoadBalancer` and
    `IApplicationLoadBalancer` interfaces it allows to create these metrics also for
    LBs that are imported via the `fromXXX` methods.
    
    To create the metrics for LBs requires only the full name of the LB. This
    attribute is available at the constructs returned by the `fromXXX` methods.
    
    To solve this problem I did:
    
    - Introduce a new interface for each LB type: `INetworkLoadBalancerMetrics`,
    `IApplicationLoadBalancerMetrics`
    - Create a concrete implementation for the new interfaces (1 for each):
    `NetworkLoadBalancerMetrics` and `ApplicationLoadBalancerMetrics`
    - Make each concrete implementation of each Load Balancer to also provide a
    `metrics` field. The concrete implementations of the load balancers are:
    `ImportedApplicationLoadBalancer`, `LookedUpApplicationLoadBalancer`,
    `ApplicationLoadBalancer` (and the same for the NLB classes).
    
    I chose to create a new interface because code can be reused across the 3
    concrete implementations of each Load Balancer. I deprecated the `metricXXX()`
    methods of each load balancer because I think it is cleaner to access metrics
    through the new `metrics` attribute/interface.
    Gustavo Muenz committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    3ff2ed6 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    0efedf7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    362624d View commit details
    Browse the repository at this point in the history