The course is part of these learning paths
Once you have implemented your application infrastructure on Google Cloud Platform, you will need to maintain it. Although you can set up Google Cloud to automate many operations tasks, you will still need to monitor, test, manage, and troubleshoot it over time to make sure your systems are running properly.
This course will walk you through these maintenance tasks and give you hands-on demonstrations of how to perform them. You can follow along with your own GCP account to try these examples yourself.
- Use Stackdriver to monitor, log, report on errors, trace, and debug
- Ensure your infrastructure can handle higher loads, failures, and cyber-attacks by performing load, resilience, and penetration tests
- Manage your data using lifecycle management and migration from outside sources
- Troubleshoot SSH errors, instance startup failures, and network traffic dropping
- System administrators
- People who are preparing to take the Google Professional Cloud Architect certification exam
- Google Cloud Platform: Fundamentals course or experience with Google Cloud Platform
In the last lesson, we looked at how to debug errors in your application. But what do you do if your application is working properly but performing too slowly? That's what Stackdriver Trace is for.
The first time you go into the trace page, you'll have to click a button to enable tracing. So if you haven't done that already, do it now. Unfortunately, it will take 24 hours after enabling trace before latency data will appear in the trace overview. It'll prompt you to create a custom analysis report instead. I enabled trace more than a day ago, so I do see trace data in the overview.
The trace list is probably where you'll spend most of your time. It shows you all the traces over a specific period of time in this cool graph. It is set to one day right now, but we can change that to give a longer or shorter view. Each one of these dots is a trace of an individual request to the application. If you click on one of the dots, it brings up two more panes underneath. The timeline shows what happened during the request. The first bar shows the total end to end time which was 177 milliseconds in this case. The bars underneath show the time it took to complete RPC calls performed when handling the request. In this case, we only have one tiny bar for when the debugger started.
Of course, this timeline would be a lot more useful if we were running a more complex application with multiple RPC calls so you could see which ones were taking the most time. The "Hello, World!" Application is about the simplest application possible. So you'll just have to use your imagination here.
Analysis reports show you the latency distribution for your application and also attempt to identify performance bottlenecks which is a great feature. You have to have at least 100 traces before you run a report though.
If you're running your applications in App Engine, then it will automatically capture and submit traces to Stackdriver trace, but if you want to trace code that's running outside of App Engine, then you'll have to either add instrumentation code to your applications using the Trace SDK or submit traces through the API.
Before we go, you might want to delete your application so it doesn't incur charges. Go to App Engine, and then go to settings. Click disable application. It will ask you to type the app's ID before you can click disable. This doesn't delete the application, but it does stop it from serving requests. To start the application up again, you can just click, enable application.
If you want to permanently delete the application, then you'll have to delete the project it's associated with which you can do in the IAM and Admin page. Be aware that if you delete a project, you'll never be able to use that project ID again. That is, you won't be able to create a new project with the same ID.
And that's it for this lesson.
About the Author
Guy launched his first training website in 1995 and he's been helping people learn IT technologies ever since. He has been a sysadmin, instructor, sales engineer, IT manager, and entrepreneur. In his most recent venture, he founded and led a cloud-based training infrastructure company that provided virtual labs for some of the largest software vendors in the world. Guy’s passion is making complex technology easy to understand. His activities outside of work have included riding an elephant and skydiving (although not at the same time).