Skip to content

Commit

Permalink
fix: Output erroneous namespace and continue instead of error out (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeylanzman authored May 16, 2022
1 parent 5014d6b commit 23afa9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/inputs/cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ func (c *CloudWatch) fetchNamespaceMetrics() ([]types.Metric, error) {
for {
resp, err := c.client.ListMetrics(context.Background(), params)
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...)
Expand Down

0 comments on commit 23afa9f

Please sign in to comment.