Querying Tracing Details
Function
This API is used to query tracing details based on trace ID.
URI
GET /v1/{project_id}/ats/spans
Request
Request headers
Table 1 describes the request headers.
| Parameter | Description | Mandatory | Example |
|---|---|---|---|
| clusterId | Cluster ID. | No | default |
| namespace | Namespace. | No | manage |
Path parameters
Table 2 describes the path parameter.
Request parameters
Table 3 describes the request parameter.
| Parameter | Mandatory | Type | Value Range | Description |
|---|---|---|---|---|
| traceId | Yes | String | Trace ID obtained from the tracing data | Trace ID. |
Example request
/v1/0/ats/spans?traceId=0000000027046b00
Response
Response parameters
Table 4 describes the response parameters.
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code. SVCSTG.ATS.2000: Query succeeded. SVCSTG.ATS.400101: Parameter verification failed. SVCSTG.ATS.200103: No tracing data found. |
| errorMessage | String | Description of the error. |
| responseInfo | List (string). See Table 5. | Tracing query result. |
| Parameter | Type | Description |
|---|---|---|
| traceId | String | Trace ID, which is globally unique. |
| name | String | Service name: Instance name: Transaction name |
| id | String | Span ID. |
| parentId | String | Upper-level span ID. |
| timestamp | Long | Call start time (unit: μs). |
| duration | Long | Span call duration (unit: μs). |
| annotations | List (string). See Table 6. | Service information about the client or server. |
| binaryAnnotations | List (string). See Table 7. | Extended information. |
| Parameter | Type | Description |
|---|---|---|
| timestamp | Long | Current system time when an event occurs (unit: μs). |
| endpoint | See Table 8. | (Optional) Service information about the client. |
| value | String | Invocation event type. Options:
|
| Parameter | Type | Description |
|---|---|---|
| key | String | Name of the extended information. |
| endpoint | See Table 8. | (Optional) Service information about the client. |
| value | String | Value of the extended information. |
| Parameter | Type | Description |
|---|---|---|
| serviceName | String | (Optional) Service name of the client. |
| ipv4 | String | (Optional) IP address of the client. |
| port | String | (Optional) Port of the client. |
Example response
{
"errorCode": "SVCSTG.ATS.2000",
"errorMessage":null,
"responseInfo": [
"{\"traceId\":\"0000000027046b00\",\"id\":\"b42460f5cf86cab4\",\"name\":\"aos-apiserver:aos-apiserver-1005774711-ll63p:/api/v1/namespaces/manage/pods\",\"timestamp\":1506260836597000,\"duration\":67000,\"annotations\":[{\"timestamp\":1506260836597000,\"value\":\"cs\",\"endpoint\":{\"serviceName\":\"aos-apiserver\",\"ipv4\":\"10.186.60.43\",\"port\":6443}},{\"timestamp\":1506260836664000,\"value\":\"cr\",\"endpoint\":{\"serviceName\":\"aos-apiserver\",\"ipv4\":\"10.186.60.43\",\"port\":6443}}],\"binaryAnnotations\":[{\"key\":\"append\",\"value\":\"GET\"},{\"key\":\"async\",\"value\":\"0\"},{\"key\":\"goid\",\"value\":\"58\"},{\"key\":\"result\",\"value\":\"0\"},{\"key\":\"resultCode\",\"value\":\"200\"},{\"key\":\"seqno\",\"value\":\"1506260836597048618\"},{\"key\":\"type\",\"value\":\"1\"}]}"
]
} Status Code
- Success response
Last Article: Querying Tracing Data
Next Article: Permissions Policies and Supported Actions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.