Skip to content

Commit

Permalink
only add instances from project_id
Browse files Browse the repository at this point in the history
  • Loading branch information
gpop63 committed Aug 15, 2023
1 parent 7a93b01 commit 89f6ab5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x-pack/metricbeat/module/gcp/metrics/metrics_requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ func (r *metricsRequester) Metric(ctx context.Context, serviceName, metricType s
break
}

if projectID, ok := resp.Resource.Labels["project_id"]; ok {
if projectID != r.config.ProjectID {
continue
}
}

timeSeries = append(timeSeries, resp)
}

Expand Down

0 comments on commit 89f6ab5

Please sign in to comment.