GoogleCloudPlatform / GoogleCloudPlatform/opentelemetry-operations-python
Support custom monitored resources for Metrics
- Dominant language
- Python
- Stars
- 83
- Forks
- 46
- Avg merge
- 11h 40m
- Merged PRs (30d)
- 2
Description
The exporter [currently uses](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/blob/0b37f8886f8a57b34525631ebd7bb2cf52c51084/opentelemetry-exporter-gcp-monitoring/src/opentelemetry/exporter/cloud_monitoring/__init__.py#L304) a call to [gcp_resource_detector.get_monitored_resource](https://github.com/GoogleCloudPlatform/opentelemetry-operations-python/blob/0b37f8886f8a57b34525631ebd7bb2cf52c51084/opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector/_mapping.py#L145) 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](https://cloud.google.com/monitoring/api/resources)
Contributor guide
Assessment
This issue has not been assessed yet.