fix: Output erroneous namespace and continue instead of error out (#11069)
This commit is contained in:
parent
5014d6b2b3
commit
23afa9f28c
|
|
@ -328,7 +328,9 @@ func (c *CloudWatch) fetchNamespaceMetrics() ([]types.Metric, error) {
|
||||||
for {
|
for {
|
||||||
resp, err := c.client.ListMetrics(context.Background(), params)
|
resp, err := c.client.ListMetrics(context.Background(), params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to list metrics with params per namespace: %v", err)
|
c.Log.Errorf("failed to list metrics with namespace %s: %v", namespace, err)
|
||||||
|
// skip problem namespace on error and continue to next namespace
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics = append(metrics, resp.Metrics...)
|
metrics = append(metrics, resp.Metrics...)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue