You can invoke the GetTrace API to obtain trace details.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
xtrace:SearchTrace |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TraceID |
string |
Yes |
The trace ID, which is the unique identifier of the trace. You can obtain the trace ID on the Trace Explorer page in the Managed Service for OpenTelemetry console or by calling the SearchTraces operation. |
1c6881aab84191a4****** |
| AppType |
string |
No |
The type of the application. You can leave this parameter empty or set the value to
|
XTRACE |
| RegionId |
string |
Yes |
The ID of the region. |
cn-beijing |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
string |
No |
The number of entries on each page. Maximum value: 100. |
5 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
1E2B6A4C-6B83-4062-8B6F-AEEC1F****** |
| Spans |
object |
||
| Span |
array<object> |
The list of spans. |
|
|
array<object> |
The list of spans. |
||
| SpanId |
string |
The span ID. |
fec891bb8f8XXX |
| HaveStack |
boolean |
Indicates whether the span has child spans. Valid values:
|
false |
| ServiceIp |
string |
The IP address of the server on which the span resides. |
192.168.XXX.XXX |
| OperationName |
string |
The name of the span. |
/api |
| ParentSpanId |
string |
The ID of the parent span. |
fec891bb8f8XXX |
| ResultCode |
string |
The response code. |
200 |
| Duration |
integer |
The duration of the span. Unit: milliseconds. |
1000 |
| RpcId |
string |
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. |
1.1 |
| Timestamp |
integer |
The timestamp when the span was generated. Unit: microseconds. |
1689845513298000 |
| ServiceName |
string |
The name of the application. |
server1 |
| TraceID |
string |
The trace ID, which is the unique identifier of the trace. |
1c6881aab84191a4 |
| TagEntryList |
object |
||
| TagEntry |
array<object> |
The tags. |
|
|
object |
The tags in the span. |
||
| Key |
string |
The tag key of the span. |
logLevel |
| Value |
string |
The tag value of the span. |
Warning |
| LogEventList |
object |
||
| LogEvent |
array<object> |
The log events. |
|
|
array<object> |
The log events in the trace. |
||
| Timestamp |
integer |
The timestamp when the log event was generated. Unit: microseconds. |
1689845513298000 |
| TagEntryList |
object |
||
| TagEntry |
array<object> |
The tags. |
|
|
object |
The tags in the log event. |
||
| Key |
string |
The tag key of the log event. |
logLevel |
| Value |
string |
The tag value of the log event. |
Warning |
| StatusCode |
integer |
The status code. |
200 |
Examples
Success response
JSON format
{
"RequestId": "1E2B6A4C-6B83-4062-8B6F-AEEC1F******",
"Spans": {
"Span": [
{
"SpanId": "fec891bb8f8XXX",
"HaveStack": false,
"ServiceIp": "192.168.XXX.XXX",
"OperationName": "/api",
"ParentSpanId": "fec891bb8f8XXX",
"ResultCode": "200",
"Duration": 1000,
"RpcId": "1.1",
"Timestamp": 1689845513298000,
"ServiceName": "server1",
"TraceID": "1c6881aab84191a4",
"TagEntryList": {
"TagEntry": [
{
"Key": "logLevel",
"Value": "Warning"
}
]
},
"LogEventList": {
"LogEvent": [
{
"Timestamp": 1689845513298000,
"TagEntryList": {
"TagEntry": [
{
"Key": "logLevel",
"Value": "Warning"
}
]
}
}
]
},
"StatusCode": 200
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.