Queries the details of a trace.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetTrace |
The operation that you want to perform. Set the value to GetTrace. |
TraceID | String | Yes | 1c6881aab84191a4 |
The unique ID of the trace. You can obtain the trace ID on the Trace Analysis page in the console. |
AppType | String | No | XTRACE |
The type of the application. You can set the value to |
RegionId | String | Yes | cn-beijing |
The ID of the region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 1E2B6A4C-6B83-4062-8B6F-AEEC1FC47DED |
The ID of the request. |
Spans | Array of Span |
The spans that are contained in the trace. |
|
Span | |||
SpanId | String | fec891bb8f8XXX |
The ID of the span. |
HaveStack | Boolean | false |
Indicates whether the span has child spans. Valid values:
|
ServiceIp | String | 192.168.XXX.XXX |
The IP address of the server where the span resides. |
OperationName | String | /api |
The name of the span. |
ParentSpanId | String | fec891bb8f8XXX |
The ID of the parent span. |
ResultCode | String | 200 |
The HTTP status code. |
Duration | Long | 1000 |
The time consumed to call the trace. Unit: milliseconds. |
RpcId | String | 1.1 |
The parent-child and sibling relationship between spans. For example, span 1.1 is the parent of span 1.1.1, and span 1.1.2 and span 1.1.1 are siblings. |
Timestamp | Long | 1583683202047000 |
The timestamp when the span was generated. |
ServiceName | String | server1 |
The name of the application. |
TraceID | String | 1c6881aab84191a4 |
The unique ID of the trace. |
TagEntryList | Array of TagEntry |
The tags of the span. |
|
TagEntry | |||
Key | String | logLevel |
The tag key of the span. |
Value | String | Warning |
The tag value of the span. |
LogEventList | Array of LogEvent |
The log events. |
|
LogEvent | |||
Timestamp | Long | 1583683202047000 |
The timestamp when the log event was generated. |
TagEntryList | Array of TagEntry |
The tags of the log event. |
|
TagEntry | |||
Key | String | logLevel |
The tag key of the log event. |
Value | String | Warning |
The tag value of the log event. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GetTrace
&RegionId=cn-beijing
&TraceID=1c6881aab84191a4
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetTraceResponse>
<RequestId>1E2B6A4C-6B83-4062-8B6F-AEEC1FC47DED</RequestId>
<Spans>
<Span>
<HaveStack>false</HaveStack>
<ParentSpanId>fec891bb8f8XXX</ParentSpanId>
<ServiceIp>192.168.XXX.XXX</ServiceIp>
<ServiceName>server1</ServiceName>
<OperationName>/api</OperationName>
<RpcId>1.1</RpcId>
<TraceID>1c6881aab84191a4</TraceID>
<Duration>1000</Duration>
<Timestamp>1583683202047000</Timestamp>
<ResultCode>200</ResultCode>
<SpanId>fec891bb8f8XXX</SpanId>
<TagEntryList>
<TagEntry>
<Value>Warning</Value>
<Key>logLevel</Key>
</TagEntry>
</TagEntryList>
<LogEventList>
<LogEvent>
<Timestamp>1583683202047000</Timestamp>
<TagEntryList>
<TagEntry>
<Value>Warning</Value>
<Key>logLevel</Key>
</TagEntry>
</TagEntryList>
</LogEvent>
</LogEventList>
</Span>
</Spans>
</GetTraceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "1E2B6A4C-6B83-4062-8B6F-AEEC1FC47DED",
"Spans" : {
"Span" : [ {
"HaveStack" : "false",
"ParentSpanId" : "fec891bb8f8XXX",
"ServiceIp" : "192.168.XXX.XXX",
"ServiceName" : "server1",
"OperationName" : "/api",
"RpcId" : "1.1",
"TraceID" : "1c6881aab84191a4",
"Duration" : "1000",
"Timestamp" : "1583683202047000",
"ResultCode" : "200",
"SpanId" : "fec891bb8f8XXX",
"TagEntryList" : {
"TagEntry" : [ {
"Value" : "Warning",
"Key" : "logLevel"
} ]
},
"LogEventList" : {
"LogEvent" : [ {
"Timestamp" : "1583683202047000",
"TagEntryList" : {
"TagEntry" : [ {
"Value" : "Warning",
"Key" : "logLevel"
} ]
}
} ]
}
} ]
}
}
Error codes
For a list of error codes, visit the Error Center.