Skip to content
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

feat(googlecloudmonitoring): support monitoring filters #37264

Merged

Conversation

chenlujjj
Copy link
Contributor

Description

Link to tracking issue

Fixes part of #36898

Testing

Documentation

@chenlujjj chenlujjj changed the title feat(googlecloudmonitoring): filter metric via regex feat(googlecloudmonitoring): support monitoring filters Jan 17, 2025
@chenlujjj chenlujjj force-pushed the feat-googlecloudmonitoring-filter branch 2 times, most recently from 31522d0 to 6fd50f2 Compare January 17, 2025 07:46

One of `metric_name` and `monitoring_filter` MUST be specified, but should not be specified at the same time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on https://cloud.google.com/monitoring/api/v3/filters, if we are applying these to only to ListMetricDescriptor, there are a lot of restrictions on what you can filter by that might confuse users. They can't use resource or group selectors, and presumably can't filter on labels: metric.labels.instance_name = monitoring.regex.full_match("gke-(hipster|nginx).*").

One solution would be to make this a metric_descriptor_filter config option, so that it is clear we are filtering metric descriptors (and we should also document that there are restrictions on that filter). That way we could later add a separate time_series_filter that we add to actual ListTimeSeries queries if we want.

Copy link
Contributor

github-actions bot commented Feb 1, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 1, 2025
@dashpole dashpole removed the Stale label Feb 1, 2025
@chenlujjj
Copy link
Contributor Author

Apologize for the delay, I've been on leave in the past week. I'll continue to work on this.

@chenlujjj chenlujjj force-pushed the feat-googlecloudmonitoring-filter branch 2 times, most recently from cc43b06 to 2924022 Compare February 12, 2025 08:50
@chenlujjj chenlujjj force-pushed the feat-googlecloudmonitoring-filter branch from 2924022 to 7aa0804 Compare February 12, 2025 09:22
@dashpole dashpole added the ready to merge Code review completed; ready to merge by maintainers label Feb 12, 2025
@songy23 songy23 merged commit 97a70f7 into open-telemetry:main Feb 12, 2025
173 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 12, 2025
khushijain21 pushed a commit to khushijain21/opentelemetry-collector-contrib that referenced this pull request Feb 14, 2025
…ry#37264)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes part of
open-telemetry#36898

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers receiver/googlecloudmonitoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants