Finding and viewing traces

The Trace list window lets you find, and examine, individual traces in detail. From this window, you can view and inspect all spans for a trace, view summary information for a request, and view detailed information for each span in the trace. To select traces for investigation, you use filters.

The Trace list window displays at most 1000 traces. When you have more than 1000 traces, you need to use filters to refine the time interval and to identify the traces that you want to investigate.

Trace list window

To get started, from the Google Cloud Platform Console open the Trace list window:

Go to Trace list

If this is your first time using Trace, it can take a few minutes for traces to appear. The following screenshot shows an example of the trace list for a Compute Engine configuration:

Stackdriver Trace list for Compute Engine.

Time interval

The Trace list window defaults to displaying data from the previous hour. You can change this interval to preset values by using the buttons in top of the window. The preset options are:

  • 1 hour
  • 4 hours
  • 12 hours
  • 1 day
  • 3 days
  • 1 week
  • 1 month

By default, the time interval is set to 1 hour.

To select a custom time frame, you use your pointer to highlight a section of the latency graph. This selection sets the time interval and the range of latency values for the displayed traces. For example, the following image selects a time interval of 19:00 to 6:10 AM that have a latency in the range of about 90 ms to 390 ms:

Selecting a custom time range in the trace graph.

Filters

You use filters to hide, or to find individual traces. The previous section described how you can highlight a section of the latency graph to show a subset of traces in more detail, while hiding all of the other traces. In this section, the Request filter, and the filter menus are described.

By default, the filters are set to include all traces.

Filter Description
Request filter Lets you specify one or more conditions that must be satisfied for a trace to be displayed. The filter syntax lets you define when matches are exact, or when they are prefix tests. All matches are case-sensitive. For detailed information on trace filter syntax, go to Trace filters

For example, to list all traces for a project with root span name Recv, enter the root span name,Recv, or a prefix for the root span name, such as Re.

When you want to list all traces with spans annotated with an /http/status_code label in the range 200299, where the latency is one second or more, and the trace contains a span with the exact name /modules/GetNumInstances, you would use the following filter:
    +span:/modules.GetNumInstances latency:1s /http/status_code:2
In the previous example, the trace filter term +span forces an exact match on the span name. When you want to include all traces where /modules/GetNumInstances is a prefix for a span name, omit the plus sign.

You don't need to include the string delimeter in filters unless your filter expression contains a space. For example, Recv and "Recv", are equivalent.
HTTP method The value you select for this filter applies only to trace root spans annotated with the /http/method label. You can include all requests or filter by the HTTP method type: GET, DELETE, POST, or PUT.
HTTP status The value you select for this filter applies only to trace root spans annotated with the /http/status_code label. You can select individual status values, such as 301 or ranges of status values, such as 3xx.
Service (App Engine only) Lets you select traces by their service. The value you select for service is tested against all spans of a trace. When any span matches the service, the trace is displayed.
Version (App Engine only) Lets you select traces by the application's version. The value you select for version is tested against all spans of a trace. When any span matches the value, the trace is displayed.

Latency graph

Under the row of filters is a latency graph and a table of the most recent traces. Each dot in the latency graph corresponds to a specific request. The x-y coordinates for a request correspond to the time and latency of the request.

When you hold the pointer over a dot, a dialog appears that includes the date, time, and latency:

    5/15/2019, 9:25:02 AM - 69 ms

When you click a dot, the following actions occur:

  • The table is updated to highlight the request you selected.
  • A Timeline is displayed under the latency graph. The timeline displays all of the latency information between services for that request.
  • A pane is displayed that includes a Summary table with information about the request and a Details table with information about the root span.

When you click a span in the Timeline, the Details pane displays additional information about that span. From this pane, you can open and view log entries, when they are available. For more information, go to Viewing trace details.

Recent request table

The table displays the 5 most recent requests to your application:

Attribute Description
Latency The end-to-end time for the application to handle the request.
HTTP method Type of HTTP method, when applicable. This field is blank for non-HTTP requests.
URI The relative URI of the request.
Analysis report A link to the associated analysis report, when one is available.
Time When the request was started.

You can change the requests displayed in the table by using any of the following methods:

  • Select a time range.
  • Browse backwards or forwards by using the Previous and Next buttons.
  • Click a dot in the latency graph.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Trace
Need help? Visit our support page.