-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit number of goroutines for GetMetricData calls
The CloudWatch client already limits the number of concurrent requests to GetMetricData API via the `-cloudwatch-concurrency` flag, however in discovery jobs there's no limit to how many goroutines can be spawn at the same time and get blocked waiting for the client to be available. With this change, we use an errgroup to block adding goroutines to handle GetMetricData partitions until the client is actually available.
- Loading branch information
1 parent
ba183dd
commit 2f55b60
Showing
1 changed file
with
34 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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