How To View Request Logs On Google Cloud Platform ?
Last Updated :
19 Feb, 2024
Google Cloud Platform Logs Explorer is a tool that enables users to retrieve view and analyze log data helping them troubleshoot problems and monitor their resources effectively. Logs are records of event ed through Google Cloud Console and log entries can be read through the Logging API or Google Cloud CLI. Users can control how log entries are routed and stored using Log Router. The Logs Explorer lets users find and view logs to troubleshoot problems and log data can be exported to other applications using Google Cloud Pub/Sub. GCP logging provides a centralized location for storing and analyzing log data and allows users to set up alerts and notifications based on specific log patterns and events.
Primary Components Google Cloud Platform
- Logs Explorer: A feature within the Google Cloud console that allows users to retrieve and analyze log data.
- Log Entries: Record of events that occur in the operation of a and managed by Cloud Logging.
- Logging API: An interface that enables programmatic access to log data.
- Cloud CLI: Command line interface for Google Cloud used to manage resources and services.
Step-by-Step Process To Create A Google Cloud Run Service
Step 1: Navigate to Google Cloud and log in with your registered ID.
Step 2: In Console Navigation to the menu section and click on Cloud Run.

Step 3: Create a Service in the project by clicking on "Create a Service". The following screenshot illustrates it clearly.

Step 4: In the create service form enter the following details and click on Next to continue .
- Service Name: My project cloud run-service
- Deployment Platform: Cloud Run
- Region: us-central1 (or region closest to your location)

Step 5 : In Configure the Service’s first revision page enter the following details and click on Next.
- Select Deploy one revision from an existing container image.
- Use us-docker.pkg.dev/cloudrun/container/hello as the container image.

Step 6: In Configure how this service is triggered form, select the Allow all traffic option and Allow unauthenticated invocations in the respective fields. Click on Create to deploy the image to Cloud Run and wait for the deployment to finish.

Step 7: After some time, your deployment will be completed.

Step 8: To check the deployment status, copy the URL generated in the Cloud Run details page.

Step 9: Open the URL in a new tab and you will see you have successfully deployed a container image to the Cloud Run.
Verification And Testing
- Access Your Service: Use the service's URL, provided during deployment, to access it in your browser.
- Test Functionality: Execute thorough tests to ensure your service works as expected.
Example Scenarios Of Viewing Request Logs
Example - 1
For example If you want to view the logs related to virtual machines created on Google Cloud Compute Engine you can use Logs Explorer to the Logging API to filter and retrieve the specific log entries related to VM creation.
Example - 2
For example let say you have web application running on Google Cloud Compute Engine and you want to view logs related to HTTP request made to application. You can use Logs Explorer to filter and retrieve specific log entries related to HTTP request.

Similar Reads
How To View Request Logs ? Stackdriver Logging is the default log service provided by the Google Cloud Platform. Logging in to the Google Cloud Platform (GCP) is like keeping a detailed journal of everything that happens and when it happens in your Google Cloud environment. It is important to be aware of what is going on with
4 min read
Working of Google Cloud Platform Pre-requisite: Google Cloud Platform Google Cloud Platform is a collection of cloud computing services offered by Google, including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) products. These services are designed to provide businesses with the
8 min read
Google Cloud Platform - Overview of G Suite APIs Many of you know how to use Gmail, Google Drive, and Docs, and that's great. But can you code them too? In this article we aim to learn about G Suite as another tool, giving you the ability to code those apps you know so well. Productivity tools like a word processor, spreadsheets, and presentation
5 min read
Google Cloud Platform - Setting Up a Game Server In this article, we will set up a server in a public cloud to serve a game application by using infrastructure as a service (IaaS) provided by the google cloud platform. However, the process will be nearly the same for any other public cloud platforms. Overview of steps:Set up the account and create
4 min read
Google Cloud Platform - Ways of Serving files from GCS When it comes to the cloud, there is more than one way to serve a file. In, this article, we will walk through all the different ways to serve a file from Google Cloud Storage. It is kind of like having a yard sale, but all the stuff stays in your yard or you decide where it goes. You probably alrea
3 min read