-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat] Add GCP CloudSQL region filter #32943
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
This pull request is now in conflicts. Could you fix it? 🙏
|
@@ -152,7 +157,7 @@ func (r *metricsRequester) getFilterForMetric(serviceName, m string) string { | |||
// } | |||
|
|||
region := strings.TrimSuffix(r.config.Region, "*") | |||
f = fmt.Sprintf(`%s AND resource.labels.zone = starts_with("%s")`, f, region) | |||
f = fmt.Sprintf(`%s AND resource.labels.region = starts_with("%s")`, f, region) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not include this change here, as it's not related to CloudSQL. This change is also a breaking change, so we need to take another approach.
I would add a comment, so we can remove this in the future: FIXME: this is using zone but should use region. This is a breaking change.
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 minor changes required then this can be merged
CHANGELOG.next.asciidoc
Outdated
- Add GCP CloudSQL region filter {pull}32943[32943] | ||
- Add network name to data.json {pull}32986[32986] | ||
- Add missing cluster metadata to k8s module metricsets {pull}32979[32979] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add GCP CloudSQL region filter {pull}32943[32943] | |
- Add network name to data.json {pull}32986[32986] | |
- Add missing cluster metadata to k8s module metricsets {pull}32979[32979] | |
- Add GCP CloudSQL region filter {pull}32943[32943] |
@@ -198,6 +211,7 @@ func (r *metricsRequester) getFilterForMetric(serviceName, m string) string { | |||
|
|||
switch { | |||
case r.config.Region != "": | |||
// FIXME: using resource.labels.zone but should use region. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though about this, let's remove it from here and do it for good separately. I'll open an issue to discuss how to address this.
// FIXME: using resource.labels.zone but should use region. |
* add cloudsql region filter * add changelog entry * fix comment for golangci-lint * fix get filter for metric tests * better AlignersMapToGCP comment * revert to zone and add comment * Revert "fix get filter for metric tests" This reverts commit e3ea3b8. * add cloudsql region label * add regions filter * fix changelog * remove comment from metrics requester
What does this PR do?
Adds GCP
cloudsql
region filter.Why is it important?
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs