- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization Scopes
- ViewType
- Try it!
Returns a list of traces that match the specified filter conditions.
HTTP request
GET https://cloudtrace.googleapis.com/v1/projects/{projectId}/traces
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
projectId |
Required. ID of the Cloud project where the trace data is stored. Authorization requires the following IAM permission on the specified resource
|
Query parameters
Parameters | |
---|---|
view |
Optional. Type of data returned for traces in the list. Default is |
pageSize |
Optional. Maximum number of traces to return. If not specified or <= 0, the implementation selects a reasonable value. The implementation may return fewer traces than the requested page size. |
pageToken |
Token identifying the page of results to return. If provided, use the value of the |
startTime |
Start of the time interval (inclusive) during which the trace data was collected from the application. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTime |
End of the time interval (inclusive) during which the trace data was collected from the application. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
filter |
Optional. A filter against labels for the request. By default, searches use prefix matching. To specify exact match, prepend a plus symbol (
|
orderBy |
Optional. Field used to sort the returned traces. Can be one of the following:
Descending order can be specified by appending Only one sort field is permitted. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
The response message for the traces.list
method.
JSON representation | |
---|---|
{
"traces": [
{
object ( |
Fields | |
---|---|
traces[] |
List of trace records as specified by the view parameter. |
nextPageToken |
If defined, indicates that there are more traces that match the request and that this value should be passed to the next request to continue retrieving additional traces. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/trace.readonly
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
ViewType
Type of data returned for traces in the list.
Enums | |
---|---|
VIEW_TYPE_UNSPECIFIED |
Default is MINIMAL if unspecified. |
MINIMAL |
Minimal view of the trace record that contains only the project and trace IDs. |
ROOTSPAN |
Root span view of the trace record that returns the root spans along with the minimal trace data. |
COMPLETE |
Complete view of the trace record that contains the actual trace data. This is equivalent to calling the REST get or RPC traces.get method using the ID of each listed trace. |