You can call this operation to query trace query results based on a specified trace query task ID.
If you have created a trace query task based on a message ID or message key and have obtained the ID of the trace query task, you can call this operation to query the detailed trace query results based on the task ID.
A message trace query task is time-consuming. If you query the results by calling this operation immediately after creating the task, the results may be empty. If this occurs, we recommend that you wait for a while and try again.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | OnsTraceGetResult |
The operation that you want to perform. Set the value to OnsTraceGetResult. |
QueryId | String | Yes | 272967562652883649157096685**** |
The ID of the trace query task for which you want to query the trace query results. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TraceData | Struct |
The detailed results of the query task. |
|
CreateTime | Long | 1570966857000 |
The time when the query task was created. |
InstanceId | String | MQ_INST_111111111111_DOxxxxxx |
The ID of the Message Queue for Apache RocketMQ instance corresponding to the query task. |
MsgId | String | 1E05791C117818B4AAC23B1BB0CE**** |
The message ID corresponding to the query task. |
MsgKey | String | ORDERID_100 |
The message key corresponding to the query task. |
QueryId | String | 272967562652883649157096685**** |
The ID of the query task. |
Status | String | finish |
The status of the query task. Valid values:
|
Topic | String | test |
The topic corresponding to the query task. |
TraceList | Array |
A returned list of matched traces for the query task. |
|
TraceMapDo | |||
BornHost | String | 30.5.**. ** |
The address of the producer instance that produced the message corresponding to the query task. |
CostTime | Integer | 24 |
The amount of time taken to send the message. Unit: milliseconds. |
MsgId | String | 0BC1F01800002A9F000000531246**** |
The ID of the message corresponding to the query task. |
MsgKey | String | ORDERID_100 |
The key of the message corresponding to the query task. |
PubGroupName | String | GID_test |
The group ID configured on the producer instance that produced the message corresponding to the query task. |
PubTime | Long | 1570850870478 |
The time when the message was sent. |
Status | String | SEND_SUCCESS |
The sending status of the message corresponding to the query task. Valid values:
|
SubList | Array |
A returned list of consumption traces of the queried message. |
|
SubMapDo | |||
ClientList | Array |
Detailed consumption records of the consumer instance corresponding to the group ID. |
|
SubClientInfoDo | |||
ClientHost | String | 30.5.**. ** |
The address of the consumer instance that consumed the message. |
CostTime | Integer | 43 |
The amount of time taken to consume the message. Unit: milliseconds. |
ReconsumeTimes | Integer | 1 |
The number of message delivery rounds for the consumption. |
Status | String | CONSUME_SUCCESS |
The consumption status of the message. Valid values:
|
SubGroupName | String | GID_test |
The group ID corresponding to the consumer instance that consumed the message. |
SubTime | Long | 1570851590511 |
The timestamp indicating when the consumption started. |
FailCount | Integer | 0 |
The number of consumption failures corresponding to the group ID. |
SubGroupName | String | GID_test |
The group ID corresponding to the consumer instance that consumed the message. |
SuccessCount | Integer | 1 |
The number of successful consumptions corresponding to the group ID. |
Tag | String | TagA |
The tag of the message. |
Topic | String | test |
The topic of the message. |
UpdateTime | Long | 1570966877000 |
The time when the query task was last updated. |
UserId | String | 27296756265288**** |
The ID of the query user. |
RequestId | String | 84EE24D2-851F-40D6-B99E-4D6AB9098BC4 |
The ID of the request. This is a common parameter. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=OnsTraceGetResult
&QueryId=272967562652883649157096685****
&<Common request parameters>
Sample success responses
XML
format
<OnsTraceGetResultResponse>
<TraceData>
<MsgId>1E05791C117818B4AAC23B1BB0CE****</MsgId>
<Status>finish</Status>
<TraceList>
<TraceMapDo>
<BornHost>30.5. **. **</BornHost>
<MsgId>0BC1F01800002A9F000000531246****</MsgId>
<Status>SEND_SUCCESS</Status>
<CostTime>24</CostTime>
<PubTime>1570850870478</PubTime>
<Tag>TagA</Tag>
<Topic>test</Topic>
<MsgKey>ORDERID_100</MsgKey>
<PubGroupName>GID_test</PubGroupName>
<SubList>
<SubMapDo>
<ClientList>
<SubClientInfoDo>
<Status>CONSUME_SUCCESS</Status>
<CostTime>43</CostTime>
<ClientHost>30.5. **. **</ClientHost>
<ReconsumeTimes>1</ReconsumeTimes>
<SubTime>1570851590511</SubTime>
<SubGroupName>GID_test</SubGroupName>
</SubClientInfoDo>
</ClientList>
<SuccessCount>1</SuccessCount>
<FailCount>0</FailCount>
<SubGroupName>GID_test</SubGroupName>
</SubMapDo>
</SubList>
</TraceMapDo>
</TraceList>
<CreateTime>1570966857000</CreateTime>
<InstanceId>MQ_INST_111111111111_DOxxxxxx</InstanceId>
<Topic>test</Topic>
<UpdateTime>1570966877000</UpdateTime>
<QueryId>272967562652883649157096685****</QueryId>
<UserId>27296756265288****</UserId>
</TraceData>
<RequestId>84EE24D2-851F-40D6-B99E-4D6AB9098BC4</RequestId>
</OnsTraceGetResultResponse>
JSON
format
{
"TraceData": {
"MsgId": "1E05791C117818B4AAC23B1BB0CE****",
"Status": "finish",
"TraceList": {
"TraceMapDo": [
{
"BornHost": "30.5. **. **",
"MsgId": "0BC1F01800002A9F000000531246****",
"Status": "SEND_SUCCESS",
"CostTime": 24,
"PubTime": 1570850870478,
"Tag": "TagA",
"Topic": "test",
"MsgKey": "ORDERID_100",
"PubGroupName": "GID_test",
"SubList": {
"SubMapDo": [
{
"ClientList": {
"SubClientInfoDo": [
{
"Status": "CONSUME_SUCCESS",
"CostTime": 43,
"ClientHost": "30.5. **. **",
"ReconsumeTimes": 1,
"SubTime": 1570851590511,
"SubGroupName": "GID_test"
}
]
},
"SuccessCount": 1,
"FailCount": 0,
"SubGroupName": "GID_test"
}
]
}
}
]
},
"CreateTime": 1570966857000,
"InstanceId": "MQ_INST_111111111111_DOxxxxxx",
"Topic": "test",
"UpdateTime": 1570966877000,
"QueryId": "272967562652883649157096685****",
"UserId": "27296756265288****"
},
"RequestId": "84EE24D2-851F-40D6-B99E-4D6AB9098BC4"
}
Error codes
For a list of error codes, visit the API Error Center.