Queries the details of a trace.

Note You must use Application Real-Time Monitoring Service (ARMS) SDK for Java V2.7.24.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetTrace

The operation that you want to perform. Set the value to GetTrace.

RegionId String Yes cn-hangzhou

The ID of the region.

TraceID String Yes ac14001a15954493811405707d****

The ID of the trace. You can log on to the ARMS console and obtain the trace ID on the Call link query page.

StartTime Long No 1623827602000

The beginning of the time range to query. Unit: milliseconds.

Note If the ID of the trace is 30 characters in length, this parameter is optional. Otherwise, this parameter is required.
EndTime Long No 1623827603000

The end of the time range to query. Unit: milliseconds.

Note If the ID of the trace is 30 characters in length, this parameter is optional. Otherwise, this parameter is required.

Response parameters

Parameter Type Example Description
Spans Array of Span

The details of the trace.

Duration Long 1000

The amount of time consumed by the trace. Unit: milliseconds.

HaveStack Boolean false

Indicates whether a method stack was provided.

  • true: A method stack was provided.
  • false : No method stack was provided.
LogEventList Array of LogEvent

The log events in the trace.

TagEntryList Array of TagEntry

The tags of the trace.

Key String http.status.code

The key of the tag.

Value String 200

The value of the tag.

Timestamp Long 1590388651

The timestamp when the trace was returned.

OperationName String /api/demo

The name of the traced span.

ParentSpanId String 18
ResultCode String 222

The HTTP status code returned.

RpcId String 0

The ID of the remote procedure call (RPC) mode.

RpcType Integer 1

The type of the RPC mode.

ServiceIp String 172.20.XX.XX

The IP address of the host where the application resides.

ServiceName String arms-demo

The name of the application.

SpanId String 1234
TagEntryList Array of TagEntry

The tags of the trace.

Key String http.status.code

The key of the tag.

Value String 200

The value of the tag.

Timestamp Long 1590388651

The timestamp when the trace was returned.

TraceID String ac14001a15954493811405707d****

The ID of the trace.

RequestId String 6A9AEA84-7186-4D8D-B498-4585C6A2****

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetTrace
&RegionId=cn-hangzhou
&TraceID=ac14001a15954493811405707d****
&<Common request parameters>

Sample success responses

XML format

<GetTraceResponse>
  <RequestId>6A9AEA84-7186-4D8D-B498-4585C6A2****</RequestId>
  <Spans>
        <HaveStack>false</HaveStack>
        <ParentSpanId>18</ParentSpanId>
        <ServiceIp>172.20.XX.XX</ServiceIp>
        <ServiceName>arms-demo</ServiceName>
        <OperationName>/api/demo</OperationName>
        <RpcType>1</RpcType>
        <RpcId>0</RpcId>
        <TraceID>ac14001a15954493811405707d****</TraceID>
        <Duration>1000</Duration>
        <Timestamp>1590388651</Timestamp>
        <ResultCode>222</ResultCode>
        <SpanId>1234</SpanId>
        <TagEntryList>
              <Value>200</Value>
              <Key>http.status.code</Key>
        </TagEntryList>
        <LogEventList>
              <Timestamp>1590388651</Timestamp>
              <TagEntryList>
                    <Value>200</Value>
                    <Key>http.status.code</Key>
              </TagEntryList>
        </LogEventList>
  </Spans>
</GetTraceResponse>

JSON format

{
    "RequestId": "6A9AEA84-7186-4D8D-B498-4585C6A2****",
    "Spans": {
        "HaveStack": false,
        "ParentSpanId": 18,
        "ServiceIp": "172.20.XX.XX",
        "ServiceName": "arms-demo",
        "OperationName": "/api/demo",
        "RpcType": 1,
        "RpcId": 0,
        "TraceID": "ac14001a15954493811405707d****",
        "Duration": 1000,
        "Timestamp": 1590388651,
        "ResultCode": 222,
        "SpanId": 1234,
        "TagEntryList": {
            "Value": 200,
            "Key": "http.status.code"
        },
        "LogEventList": {
            "Timestamp": 1590388651,
            "TagEntryList": {
                "Value": 200,
                "Key": "http.status.code"
            }
        }
    }
}