Querying Tracing Data
Function
This API is used to query tracing data based on filter criteria.
URI
GET /v1/{projectId}/ats/traces
Request
Path parameters
Table 1 describes the path parameter.
Request parameters
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Value Range |
Description |
---|---|---|---|---|
startTime |
Yes |
Integer |
<endTime |
Start time for querying tracing data (unit: ms). |
endTime |
Yes |
Integer |
>startTime |
End time for querying tracing data (unit: ms). |
application |
Yes |
String |
Service name, which must consist of lowercase letters. Example: test-service. |
|
monitorGroup |
No |
String |
Application name. |
|
instance |
No |
String |
Instance name, which must consist of lowercase letters. Example: test-service-4195149926-0fvhn. |
|
transaction |
No |
String |
Transaction name. Example: GET_/rest/healthz/*. |
|
limit |
No |
Integer |
(0, 1000] |
Number of data records returned each time. Default value: 20. Maximum value: 1000. |
duration |
No |
Integer |
Integer (≥ 0) |
Minimum call duration (unit: ms). Default value: 0. |
status |
No |
Integer |
1: Only the transactions that fail to be executed are queried. |
Transaction status. By default, all transactions are queried. If the value is 1, only the transactions that fail to be executed are queried. |
Example request
/v1/0/ats/traces?startTime=1506214200000&endTime=1506214428000&application=datamgmtservice&monitorGroup=apm&limit=1
Response
Response parameters
Table 3 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 |
Error message. |
responseInfo |
Result |
Tracing query result. |
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Tracing quantity. |
traceChains |
List<TraceChainBase> |
Tracing data set. |
Parameter |
Type |
Description |
---|---|---|
traceId |
String |
Trace ID, which is globally unique. |
type |
String |
Service type. |
status |
Integer |
Call response status. |
duration |
Integer |
Service call duration (unit: μs). |
application |
String |
Service name. |
instance |
String |
Instance name. |
transaction |
String |
Service call API/name. |
startTime |
Integer |
Start time for calling a service (unit: μs). |
endTime |
Integer |
End time for calling a service (unit: μs). |
address |
String |
IPv4 address of the client. |
Example response
{ "errorCode": "SVCSTG.ATS.2000", "errorMessage":null, "responseInfo": { "count": 1, "traceChains": [ { "traceId": "000000004fa102d1", "type": "TOMCAT_METHOD", "status": 0, "duration": 10000, "application": "datamgmtservice", "instance": "datamgmtservice-4267750592-2ngmz", "transaction": "/rest/plat/sysmgr/v1/sysagent/alarm/report", "startTime": 1506214214095000, "endTime": 1506214214105000, "address": "192.168.0.1" } ] } }
Status Code
- Success response
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot