Stackdriver Trace shows the details for a trace in the trace details view. This view shows 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.
To view the details for a trace:
Find the trace in the Google Cloud Platform Console.
In the trace list, click any request URI.
The trace details view appears.
The request summary is located at the top of the trace details view and shows a summary of information about the request, including:
|Untraced Time||Time during which no RPC calls were made (i.e. time spent locally in the app). Longer than typical untraced time at the beginning of a request can often be caused by a new instance being created to handle the load.|
|Traced Time||The aggregate time it took for all RPC calls to be completed.|
|Timestamp||Time at which the application received the incoming request.|
|HTTP Method||HTTP method for the request.|
|Status Code||HTTP status returned by the request.|
|Module||App Engine module that handled the request. See the documentation for Java, Python, Go and PHP.|
|Version||Version of the App Engine application that handled the request.|
Stackdriver Trace associates logs with traces using annotations in the log entries. App Engine Standard automatically associates its log entries with traces, but not all services do.
If you use the Trace SDK, then you have the option to annotate log entries by
trace field of the
LogEntry objects to a trace ID
in the following format:
From the trace detail view of the Cloud Platform Console, there are several ways to find log entries:
Click the Show Logs button in the Timeline panel to show log entries alongside the trace. This button appears when there are log entries associated with the trace.
Click the Log: View link in the Summary panel to open a Stackdriver Logging window and view the log entries associated with your trace. If no log entries are associated with your trace, the Logging window is empty.
Click the VM Log: View link in the Summary panel, which is present for traces generated by Cloud Load Balancer. The link opens a Stackdriver Logging window and shows you the logs from the VM instance that served the request. The Logging window view is restricted to the timestamp range of the trace.
To view any log entries, you must have the
in your project. This permission is provided by the Logging Logs Viewer and
Project Viewer IAM roles.
To view VM instance logs, you must have the
in your project. This permission is provided by the Compute Engine Network
Viewer and Project Viewer IAM roles.
For more information about viewing log entries in Stackdriver Logging, see the Logs Viewer.
The timeline is a graphical representation of latency data for the request. It shows a root span that represents the time it took for the application to process the request end-to-end, as well as subspans that represent the time it took to complete RPC calls performed when handling the request.
You can click on any span in the timeline to view additional data reported to Stackdriver Trace during application runtime. This data varies depending on whether the span is the root span or a subspan representing an RPC call.
For the root span, Stackdriver Trace displays the following properties:
|Name||Relative URL for the request. Displayed in the span label.|
|Latency||The time it took the application to handle the request end-to-end. Displayed in the span label.|
|gae/request_log_id||Internal App Engine request ID. Displayed in the details panel below the timeline.|
|http/host||Hostname where the application is running. Displayed in the details panel below the timeline.|
|http/response/size||Number of bytes in the HTTP response body. Displayed in the details panel below the timeline.|
|http/url||Relative URL for the request. Displayed in the details panel below the timeline.|
The information displayed for subspans varies depending on the RPC call. However, Stackdriver Trace always displays the following:
|Name||Name of the RPC call in format service_name.call_name (for example,
|Latency||The time it took to complete the round-trip RPC call. Displayed in the span label.|
To view a tabular summary of latency data for the request and RPC calls, click the Summary tab above the timeline.
To view insights on the performance of the request, click the Insights tab, if displayed.
For more information, see Performance insights.