Queries traces by time, application name, IP address, span name, and tag.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
xtrace:SearchTrace | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
StartTime | long | Yes | The beginning of the time range to query. The value is a timestamp that is accurate to milliseconds. | 1575561600000 |
EndTime | long | Yes | The end of the time range to query. The value is a timestamp that is accurate to milliseconds. | 1575622455686 |
RegionId | string | Yes | The ID of the region. | cn-beijing |
ServiceName | string | No | The name of the application. | service 1 |
OperationName | string | No | The name of the span. | /api |
MinDuration | long | No | The minimum value of an execution duration. Unit: seconds. For example, a value of 2 indicates that the traces whose execution duration is more than 2 seconds are queried. | 1000 |
AppType | string | No | The type of the application. You can set the value to XTRACE or leave this parameter unspecified. | XTRACE |
PageNumber | integer | No | The number of the page to return. For example, a value of 5 indicates page 5. | 1 |
PageSize | integer | No | The number of entries per page. | 100 |
Reverse | boolean | No | Specifies whether to sort the query results in chronological order or reverse chronological order. Default value: false. Valid values:
| false |
ServiceIp | string | No | The IP address of the server on which the span is running. | 10.0.0.0 |
Tag | array<object> | No | The list of the tags. | |
object | No | Tag. | ||
Key | string | No | The key of the tag. | http.status_cod |
Value | string | No | The value of the tag. | 200 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "1E2B6A4C-6B83-4062-8B6F-AEEC1F******",
"PageBean": {
"PageSize": 100,
"PageNumber": 1,
"TotalCount": 1000,
"TraceInfos": {
"TraceInfo": [
{
"OperationName": "/api",
"ServiceIp": "192.163.XXX.XXX",
"Duration": 100,
"Timestamp": 1575561600000000,
"ServiceName": "service1",
"TraceID": "1c6881aab84191a4",
"TagMap": {
"env": "dev"
},
"StatusCode": 0
}
]
}
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|