All Products
Search
Document Center

Application Real-Time Monitoring Service:GetStack

Last Updated:Oct 26, 2026

Retrieves the method stack information of a trace.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

arms:GetStack

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TraceID

string

Yes

The trace ID. You can obtain the ID on the Trace Analysis page in the ARMS console.

0a5800611641470044457853******

RegionId

string

Yes

The region ID.

cn-hangzhou

RpcID

string

Yes

The RPC ID. You can obtain the ID by calling the GetTrace operation.

0.1

Pid

string

No

The application ID.

Click the name of the target application on the Application Monitoring > Applications page in the ARMS console. The URL in the browser address bar contains the application PID in the format of pid=xxx. Because the browser encodes the URL, you need to slightly modify the PID. For example, if the PID in the URL is xxx%4074xxx, replace %40 with @ to obtain xxx@74xxx.

eb4zdose6v@36bab313a******

StartTime

integer

No

The start timestamp of the method call, in milliseconds.

1728351543000

EndTime

integer

No

The end timestamp of the method call, in milliseconds.

1728355143000

SpanID

string

No

The span ID of the trace. You can obtain the ID on the Trace Analysis page in the ARMS console.

88c32dfa4b******

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

B34C3A43-A901-5F94-9DAD-758CE4******

StackInfo

array<object>

The method stack information.

array<object>

StartTime

integer

The start timestamp of the method call.

1653555396

Exception

string

The exception information.

java.lang.NullPointerException

Api

string

The API operation name.

Tomcat Servlet Process

Line

string

The number of lines in the method stack information.

34

Duration

integer

The duration, in milliseconds.

32

RpcId

string

The RPC ID.

0.1

ServiceName

string

The service name.

/com/test

CallCount

string

The number of repeated calls to the method.

1

ExtInfo

object

The extended information.

Type

string

The type of the custom parameter information.

41

Info

string

The content of the custom parameter information.

input=254275&

Examples

Success response

JSON format

{
  "RequestId": "B34C3A43-A901-5F94-9DAD-758CE4******",
  "StackInfo": [
    {
      "StartTime": 1653555396,
      "Exception": "java.lang.NullPointerException",
      "Api": "Tomcat Servlet Process",
      "Line": "34",
      "Duration": 32,
      "RpcId": "0.1",
      "ServiceName": "/com/test",
      "CallCount": "1",
      "ExtInfo": {
        "Type": "41",
        "Info": "input=254275&"
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.