Skip to content
Permalink
Browse files
fix: changed region format on serverless (#291)
  • Loading branch information
daniel-sanche committed May 10, 2021
1 parent 9a7462e commit 360d3d23db7709b7c3946c092ef373f888f47c3d
Showing with 2 additions and 2 deletions.
  1. +2 −2 google/cloud/logging_v2/handlers/_monitored_resources.py
@@ -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
@@ -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, ""),
},
)

0 comments on commit 360d3d2

Please sign in to comment.