Hide
Cloud Trace

Cloud Trace

Contents

What is Cloud Trace?

Cloud Trace is a feature of Google Cloud Platform that collects latency data from App Engine applications and displays the data in near real time in the Google Developers Console. It helps you understand how long it takes your application to handle incoming requests from users or other applications, and how long it takes to complete operations -- specifically RPC calls -- performed when handling the requests. Currently, Cloud Trace collects end-to-end latency data for requests to App Engine URIs and additional data for round-trip RPC calls to App Engine services like Datastore, URL Fetch and Memcache.

See Cloud Trace Quickstart to get started using Cloud Trace.

Why Cloud Trace?

Latency management -- managing the amount of time it takes for your application to handle incoming requests and perform operations -- is an important part of managing overall application performance. Cloud Trace helps you monitor application latency, identify its sources, and optimize your application based on the data it collects.

Because Cloud Trace is tightly integrated with Google App Engine, it provides a high level of coverage and fidelity when collecting latency data from your applications. It also provides built-in, automatic analysis reporting that makes it easier to understand application latency and bottlenecks, and how these impact overall performance.

Cloud Trace can help you answer the following questions:

  • How long does it take my application to handle a given request?
  • Why is it taking my application so long to handle a request?
  • Why do some of my requests take longer than others?
  • What is the overall latency of requests to my application?
  • Has latency for my application increased or decreased over time?
  • What can I do to reduce application latency?

How does Cloud Trace work?

Cloud Trace works for any running App Engine application. During application runtime, App Engine sends latency data to Cloud Trace for requests to application URIs and, within the requests, for round-trip RPC calls to App Engine services. These services include:

  • Datatore
  • URL Fetch
  • Memcache
  • Users
  • App Identity

See the service API documentation for Java, Python, Go and PHP for a complete list.

App Engine sends latency data to the Cloud Trace backends in the form of a trace. The trace consists of a root span that contains overall latency information about the request, as well as subspans that contain latency information about any completed RPC calls. Each span contains a set of properties that provide information about the source and amount of latency.

Cloud Trace stores the incoming latency data in its storage backends, and makes it available for real-time viewing and reporting in the Developers Console.

How do I view Cloud Trace data?

To view Cloud Trace data, click Monitoring > Traces when viewing your project in the Developers Console. You can then find traces collected for requests to your application, view trace details, and create and view analysis reports.

Find traces for requests

The default view in Cloud Trace is the trace list. The trace list shows a list of recent requests to your application and allows you to browse and filter all associated traces by URI, module, version, time range and other parameters. You can use the trace list to find traces whose details you want to view.

Cloud Trace User Interface

You can click on the URI of any displayed trace to see its details.

See Finding Traces for more information.

View trace details

The trace details view shows detailed latency information for a particular request. This includes a summary of details about the request, a graphical timeline that shows the root span for the request and subspans for any RPC calls, and a detailed view of latency data collected for the spans.

Cloud Trace User Interface

You can use the trace details view to get an overall understanding of the latency for a particular request, and to understand the source and amount of latency that comes from RPC calls.

See Viewing Trace Details for more information.

Analysis reports

Cloud Trace also allows you to create and view analysis reports, which show you an overall view of the latency for requests to your application, or a subset of those requests. You can create an analysis report for a single time range, or generate a report for two ranges, which allows you to compare data for two time periods. Cloud Trace also automatically creates a daily report that you can use to view a snapshot of latency data for your application.

Cloud Trace User Interface

See Analysis Reports for more information.