All Products
Search
Document Center

Application Real-Time Monitoring Service:GetTrace

Last Updated:Aug 28, 2026

Queries the details of a trace.

Operation description

Note

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

TraceID

string

Yes

The trace ID. You can obtain it from the Trace Query page or Interface Snapshot tab in the ARMS console.

ac14001a15954493811405707d****

RegionId

string

Yes

The region ID.

cn-hangzhou

StartTime

integer

No

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.

1623827602000

EndTime

integer

No

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.

1623827603000

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page. Maximum value: 100.

10

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Spans

array<object>

The details of the trace.

array<object>

SpanId

string

The span ID.

1234

OperationName

string

The name of the traced span.

/api/demo

ResultCode

string

The status code.

222

Timestamp

integer

The timestamp when the span was generated.

1590388651

RpcType

integer

The remote procedure call (RPC) type.

  • 0: HTTP entry

  • 25: HTTP call

  • 1: High-speed Service Framework (HSF) call

  • 2: HSF provision

  • 40: on-premises API call

  • 60: MySQL call

  • 62: Oracle call

  • 63: PostgreSQL call

  • 70: Redis call

  • 4: Taobao Distributed Data Layer (TDDL) call

  • 5: Tair call

  • 13: MetaQ message sending

  • 252: MetaQ message receiving

  • 3: notification sending

  • 254: notification receiving

  • 7: Apache Dubbo call

  • 8: Apache Dubbo provision

  • 19: SOFARPC call

  • 18: SOFARPC provision

  • 11: Distributed Service Framework (DSF) call

  • 12: DSF provision

  • -1: unknown call

1

ServiceIp

string

The IP address of the application host.

172.20.XX.XX

HaveStack

boolean

Indicates whether a method stack was provided.

  • true: A method stack was provided.

  • false: No method stack was provided.

false

ParentSpanId

string

The ID of the parent span.

18

Duration

integer

The time consumed by the trace. Unit: milliseconds.

1000

RpcId

string

The RPC ID.

0

ServiceName

string

The name of the application.

arms-demo

TraceID

string

The trace ID.

ac14001a15954493811405707d****

TagEntryList

array<object>

The tags of the trace.

object

Key

string

The key of the tag.

http.status.code

Value

string

The value of the tag.

200

LogEventList

array<object>

The log events in the trace.

array<object>

Timestamp

integer

The timestamp when the log event was generated.

1590388651

TagEntryList

array<object>

The tags of the trace.

object

Key

string

The key of the tag.

http.status.code

Value

string

The value of the tag.

200

Children

array<object>

The child spans of the current span.

object

The details of the child span.

[ { "ParentSpanId":"c33603355032xxxx", "ServiceIp":"10.208.xxx.xxx", "OperationName":"/product/toy/8ac7ddeb-1c3c-4911-850c-665a5a0xxxx", "RpcType":0, "Duration":2, "TagEntryList":[ { "Value":"10.208.0.xxx", "Key":"source.ip" } ], "Timestamp":1652669026201, "HaveStack":true, "LogEventList":[ ], "ServiceName":"xxxxxx", "RpcId":"0.2", "TraceID":"ea1ad000a1165266902619685xxxxx", "Children":[ ], "ResultCode":"0", "SpanId":"7069ab30d7cbxxxx" } ]

Examples

Success response

JSON format

{
  "RequestId": "6A9AEA84-7186-4D8D-B498-4585C6A2****",
  "Spans": [
    {
      "SpanId": "1234",
      "OperationName": "/api/demo",
      "ResultCode": "222",
      "Timestamp": 1590388651,
      "RpcType": 1,
      "ServiceIp": "172.20.XX.XX",
      "HaveStack": false,
      "ParentSpanId": "18",
      "Duration": 1000,
      "RpcId": "0",
      "ServiceName": "arms-demo",
      "TraceID": "ac14001a15954493811405707d****",
      "TagEntryList": [
        {
          "Key": "http.status.code",
          "Value": "200"
        }
      ],
      "LogEventList": [
        {
          "Timestamp": 1590388651,
          "TagEntryList": [
            {
              "Key": "http.status.code",
              "Value": "200"
            }
          ]
        }
      ],
      "Children": [
        [
          {
            "ParentSpanId": "c33603355032xxxx",
            "ServiceIp": "10.208.xxx.xxx",
            "OperationName": "/product/toy/8ac7ddeb-1c3c-4911-850c-665a5a0xxxx",
            "RpcType": 0,
            "Duration": 2,
            "TagEntryList": [
              {
                "Value": "10.208.0.xxx",
                "Key": "source.ip"
              }
            ],
            "Timestamp": 1652669026201,
            "HaveStack": true,
            "LogEventList": [],
            "ServiceName": "xxxxxx",
            "RpcId": "0.2",
            "TraceID": "ea1ad000a1165266902619685xxxxx",
            "Children": [],
            "ResultCode": "0",
            "SpanId": "7069ab30d7cbxxxx"
          }
        ]
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.