-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Labels
api: loggingIssues related to the googleapis/python-logging API.Issues related to the googleapis/python-logging API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.
Description
See googleapis/google-cloud-go#9083
In google/cloud/logging_v2/handlers/_monitored_resources.py
, we use the value of zone
for the value of the location label in GKE:
python-logging/google/cloud/logging_v2/handlers/_monitored_resources.py
Lines 97 to 109 in 6d265bf
zone = retrieve_metadata_server(_ZONE_ID) | |
cluster_name = retrieve_metadata_server(_GKE_CLUSTER_NAME) | |
project = retrieve_metadata_server(_PROJECT_NAME) | |
resource = Resource( | |
type="k8s_container", | |
labels={ | |
"project_id": project if project else "", | |
"location": zone if zone else "", | |
"cluster_name": cluster_name if cluster_name else "", | |
}, | |
) | |
return resource |
This is incorrect for regional GKE clusters, because the value of location
should be the region where it is deployed, and is inconsistent with the value of location
for other logging statements.
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/python-logging API.Issues related to the googleapis/python-logging API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.