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

Support custom monitored resources for Metrics #298

Open
daniel-sanche opened this issue Nov 8, 2023 · 3 comments · May be fixed by #299
Open

Support custom monitored resources for Metrics #298

daniel-sanche opened this issue Nov 8, 2023 · 3 comments · May be fixed by #299
Labels
enhancement New feature or request priority: p2

Comments

@daniel-sanche
Copy link
Member

The exporter currently uses a call to gcp_resource_detector.get_monitored_resource to associate a monitored resource with each metric. But it appears that gcp_resource_detector only supports a very limited set of resources, and otherwise falls back to generic_node. We should have a way of explicitly specifying any other monitored resource supported by GCP

@daniel-sanche daniel-sanche linked a pull request Nov 8, 2023 that will close this issue
@aabmass
Copy link
Collaborator

aabmass commented Nov 8, 2023

@daniel-sanche can you add some more context on why this is needed (feel free to reach out internally). Cloud Monitoring only supports a subset of these monitored resources for custom (user) metrics https://cloud.google.com/monitoring/custom-metrics#which-resource

@daniel-sanche
Copy link
Member Author

I was hoping to use this exporter to send built-in metrics for the bigtbale client, but bigtable uses its own custom monitored_resource. It sounds like the bigtable team had to create a custom exporter for Java, but I was hoping to avoid that for python if we can get away with it.

I opened a PR that addresses this by letting users pass in a monitored resource at init, which would have other performance benefits to users outside this niche use-case. But I can also close this and just subclass the exporter in the bigtable client if you'd prefer

@aabmass aabmass added enhancement New feature or request priority: p2 labels Dec 4, 2023
@dashpole
Copy link
Contributor

Sorry this got dropped. If we implement this, it should follow the pattern set by GoogleCloudPlatform/opentelemetry-operations-go#854 and GoogleCloudPlatform/opentelemetry-operations-java#346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants