How to Visualize Google Logs with Grafana

Monitor your Cloud data with Grafana

Lynn G. Kwong
8 min readJan 11, 2022

We have introduced how to write logs to Google Cloud Logging in our Python applications. We have also introduced how to visualize our data with Grafana. Now it’s time time to combine both and try to visualize or monitor our Google Logs with Grafana, which can have a more direct and more vivid way of checking the status of our applications.

Image by neotam on Pixabay.

For Google Logs, there are two types of metrics, namely Counter and Distribution types. Counter metric can be used to monitor the frequency of some types of logs, and Distribution metric can be used to monitor the trend of some numeric values extracted from the logs. With these types of metrics, you can keep a close eye on your applications in Grafana and take actions to deal with potential errors in our applications as soon as possible.

If you have been working with GCP before and have everything set up already, you can proceed directly to the following part of the tutorial.

Remember to set an environment variable for the service account key downloaded:

--

--

Lynn G. Kwong

I’m a Software Developer (https://medium.com/@lynn-kwong) keen on sharing thoughts, tutorials, and solutions for the best practice of software development.