Skip to content

Commit

Permalink
fix: changed region format on serverless (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed May 10, 2021
1 parent 9a7462e commit 360d3d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/cloud/logging_v2/handlers/_monitored_resources.py
Expand Up @@ -73,7 +73,7 @@ def _create_functions_resource():
labels={
"project_id": project,
"function_name": function_name,
"region": region if region else "",
"region": region.split("/")[-1] if region else "",
},
)
return resource
Expand Down Expand Up @@ -131,7 +131,7 @@ def _create_cloud_run_resource():
"project_id": project,
"service_name": os.environ.get(_CLOUD_RUN_SERVICE_ID, ""),
"revision_name": os.environ.get(_CLOUD_RUN_REVISION_ID, ""),
"location": region if region else "",
"location": region.split("/")[-1] if region else "",
"configuration_name": os.environ.get(_CLOUD_RUN_CONFIGURATION_ID, ""),
},
)
Expand Down

0 comments on commit 360d3d2

Please sign in to comment.