You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The container logs written to these supported locations are automatically associated with the Cloud Run service, revision, and location.
However, the log entries from my PHP app, running on Cloud Run and using PHP client library v1.21.0 (currently the latest), show up in Google Cloud Logging with resource.type=global.
<?phprequire'vendor/autoload.php';
useGoogle\Cloud\Logging\LoggingClient;
$logging = newLoggingClient();
$logging->logger('app')->write('This is a test.');
Run composer install, build the Docker image, push it to Google Container Registry, deploy it as a revision on Cloud Run with port 80, and go to the service's URL. You'll get a blank page. Go to Google Cloud Logging. There will be a new log entry with message=This is a test. and resource.type=global (plus some other details). I was expecting resource.type=cloud_run_revision as well as resource.labels.location=..., resource.labels.service_name=..., resource.labels.revision_name=... etc.
The text was updated successfully, but these errors were encountered:
On https://cloud.google.com/run/docs/logging#container-logs it says
However, the log entries from my PHP app, running on Cloud Run and using PHP client library v1.21.0 (currently the latest), show up in Google Cloud Logging with
resource.type=global
.Minimum steps to reproduce:
Create a folder with the following 3 files.
composer.json
Dockerfile
index.php
Run
composer install
, build the Docker image, push it to Google Container Registry, deploy it as a revision on Cloud Run with port 80, and go to the service's URL. You'll get a blank page. Go to Google Cloud Logging. There will be a new log entry withmessage=This is a test.
andresource.type=global
(plus some other details). I was expectingresource.type=cloud_run_revision
as well asresource.labels.location=...
,resource.labels.service_name=...
,resource.labels.revision_name=...
etc.The text was updated successfully, but these errors were encountered: