Reader small image

You're reading from  Google Cloud Certified Professional Cloud Developer Exam Guide

Product typeBook
Published inSep 2021
PublisherPackt
ISBN-139781800560994
Edition1st Edition
Concepts
Right arrow
Author (1)
Sebastian Moreno
Sebastian Moreno
author image
Sebastian Moreno

Sebastian Moreno is a Google Developer Expert for Google Cloud Platform. He currently leads the Cloud Center of Excellence for the Google Cloud Chapter at Everis, an NTT DATA Company, He is working on multiple projects using cloud technologies like cloud innovation, virtual agents, application modernization and data analytics. He has more than eight cloud certifications in multiple cloud providers. He is a Google Cloud Certified Professional Cloud Developer.
Read more about Sebastian Moreno

Right arrow

Chapter 12: Cloud Monitoring, Tracing, and Debugging

In this chapter, you will learn how to create dashboards based on the previous chapter's logs and create automated alerts to attend to your application issues. You will also learn how to trace applications, and how to debug and profile an application using Google Cloud tools.

We will cover the following topics in this chapter:

  • Your first operational dashboard and metrics
  • Optimizing your application with cloud tracing and profiling
  • Real case examples using cloud monitoring, debugging, and tracing for applications on GCP

Technical requirements

Google Cloud SDK 317 or later is required (https://cloud.google.com/sdk).

Your first operational dashboard and metrics

Cloud Monitoring is a Google Cloud service that allows us to have greater visibility of the use of resources, availability, and the health of the applications and infrastructure that we are using in the cloud.

With Cloud Monitoring, we can collect multiple metrics in real time, thereby facilitating the work of our organization's Site Reliability Engineering (SRE) teams and enabling us to create dashboards and charts that allow us to obtain relevant information on the operation of our applications and integrations with multiple Google Cloud services.

In this section, we will start by creating all the basic elements necessary to construct the first dashboard in our project.

Creating your first workspace

A Workspace is a place where the resources in one or more Google Cloud projects or AWS accounts are monitored. From the workspace, we access the metric data of all the projects that we are monitoring, but note that the information...

Optimizing your application with cloud tracing and profiling

The more complex and large the applications are that we are developing, the more difficult it is to understand how they behave or ascertain their resource needs and consumption. Google Cloud offers two services that allow us to better understand how our applications work and thus help us to optimize both performance and resource consumption.

Next, we will review the main characteristics of these two services and how to use them in our applications.

Cloud Trace

Cloud Trace is a distributed tracing service that allows us to collect and track information related to the latency in requests that are made on applications, helping us obtain insights related to the performance of these requests.

This information allows us to detect problems related to bottlenecks within our application and so helps us to explore opportunities for improving the performance of those particular requests.

With Cloud Trace, it is possible...

Real case examples using cloud monitoring, debugging, and tracing for applications on GCP

Cloud monitoring SLOs

If you have an externally consumed application and you would like to better measure your customer satisfaction based on the quality of your service, this is possible by creating service-level objectives, or SLOs.

For this, we can create a specific group of alerts that focus on important metrics for our clients. Some recommendations for identifying good SLOs include the following:

  • Identify flows within the application that are critical and that directly impact the business (for example, product payment).
  • Identify metrics within the application that can determine the user experience and be used as service-level indicators, or SLIs (for example, the latency of operations in our application must be less than 100 ms per action).
  • Determine the objectives to be met for our SLOs and how they will be measured (for example, the % of operations with latency under...

Summary

In this chapter, we have reviewed how to increase the observability of our applications by creating dashboards with Cloud Monitoring. We also reviewed how to proactively prevent issues in our application, by creating automated alerts, and how to trace, debug, and profile an application using Google Cloud tools. In the next chapter, we will review the sample case study of Hip Local, a community application designed to facilitate communication between people living nearby, which was created by the Google Cloud team to help candidates prepare for the Google Cloud Certified Professional Cloud Developer exam.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Google Cloud Certified Professional Cloud Developer Exam Guide
Published in: Sep 2021Publisher: PacktISBN-13: 9781800560994
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Sebastian Moreno

Sebastian Moreno is a Google Developer Expert for Google Cloud Platform. He currently leads the Cloud Center of Excellence for the Google Cloud Chapter at Everis, an NTT DATA Company, He is working on multiple projects using cloud technologies like cloud innovation, virtual agents, application modernization and data analytics. He has more than eight cloud certifications in multiple cloud providers. He is a Google Cloud Certified Professional Cloud Developer.
Read more about Sebastian Moreno