Managing performance
1. Managing performance
SPEAKER: Google Cloud provides other tools that can help you manage the performance and stability of your application. Cloud Trace is a distributed tracing system that collects latency data from your applications and displays it in the Google Cloud console. You can track how requests propagate through your application and receive detailed, near-real-time performance insights. Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory allocation information from your applications. It attributes that information to the source code that generated it, which helps you identify the parts of your application that are consuming the most resources. First we look at Cloud Trace. Cloud Trace is a distributed tracing system that collects and analyzes latency in your applications. It helps you understand how long it takes your application to handle incoming requests and how long it takes to complete operations like RPC calls when handling the requests. Latency data is reported on a per-URL basis, letting you focus on the operations that are showing the most latency. Cloud Trace can help you identify changes in performance. Cloud Trace automatically creates a daily report that compares the previous day's performance with the performance from the same day of the previous week for the top endpoints. You can also create a custom analysis report and select which traces are included in the report. There are two ways to send trace data to Cloud Trace. The first is automatic tracing. Some configurations support automatic tracing. Latency data for incoming and outgoing HTTP requests from Cloud Run services and functions is automatically collected. However, latency data within the services is not collected. You can also instrument the application for tracing, which provides more detailed information than is collected for automatic tracing. You may choose to instrument applications that are running on Cloud Run. When it's available for your language, OpenTelemetry and the associated Cloud Trace Exporter are the recommended solution. You can also write custom methods to send tracing data by using the Cloud Trace API or use the Cloud Trace client libraries. A tracing client collects timing data and sends it to Cloud Trace. You then use the Google Cloud console to view and analyze the data. A trace describes the time that it takes to complete a single operation. A span describes the time that it takes to complete a suboperation within the trace. A trace consists of one or more spans. Visualization of traces and spans can help you track down performance issues in your applications. The Trace Explorer page lets you find and examine individual traces in detail. The scatter plot displays a dot for each request in the selected time interval. The xy-coordinates for a request correspond to the time and latency of the request. You can filter the shown requests by request attributes like methods or status codes. To explore a trace, you click a dot in the scatter plot. The Trace Details pane displays details about this trace and the spans contained within the trace. The dots on a span indicate events that were annotated during completion of the span suboperation. The visual indication of latency can help you determine which parts of your application are causing the performance issues. Understanding the performance of production systems is notoriously difficult. Attempting to measure performance in test environments often fails to replicate the characteristics of the production environment. Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory allocation information from your production applications. Cloud Profiler attributes that information to the source code that generated it, which helps you identify the parts of your application that are consuming the most resources.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.