All Products
Search
Document Center

Application Real-Time Monitoring Service:SearchTraces

Last Updated:Aug 28, 2026

Queries traces by time, application name, IP address, span name, and tag.

Operation description

Note

This operation returns a maximum of 100 entries. To query all traces, call the SearchTracesByPage operation. For more information, see SearchTracesByPage.

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

StartTime

integer

Yes

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

1595174400000

EndTime

integer

Yes

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

1595210400000

RegionId

string

Yes

The region ID.

cn-hangzhou

ServiceName

string

No

The name of the application.

arms-k8s-demo-subcomponent

OperationName

string

No

The name of the traced span.

/demo/queryNotExistDB/11

MinDuration

integer

No

The minimum trace duration. Unit: milliseconds.

2

Reverse

boolean

No

Specifies whether to sort query results in chronological or reverse chronological order. Default value: false.

  • true: sorts results in reverse chronological order.

  • false: sorts results in chronological order.

false

ServiceIp

string

No

The IP address of the host where the application resides.

172.20.XX.XX

Pid

string

No

The application ID.

b590lhguqs@9781be0f44dXXXX

Tag

array<object>

No

The list of tags.

object

No

Key

string

No

The tag key. The following system preset fields are provided:

  • serverApp: the name of the server application.

  • clientApp: the name of the client application.

  • service: the name of the operation.

  • rpc: the type of the call.

  • msOfSpan: the duration exceeds a specific value.

  • clientIp: the IP address of the client.

  • serverIp: the IP address of the server.

  • isError: whether the call is abnormal.

  • hasTprof: includes only traces with thread profiling.

http.status_code

Value

string

No

The value of the tag.

200

ExclusionFilters

array<object>

No

The filter conditions.

object

No

Key

string

No

The key used to filter query results.

http.status_code

Value

string

No

The value of the filter key.

404

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

4C518054-852F-4023-ABC1-4AF95FF7****

TraceInfos

array<object>

The returned trace details.

object

OperationName

string

The name of the traced span.

get***

ServiceIp

string

The IP address of the host where the application resides.

172.20.**.**

Duration

integer

The trace duration. Unit: milliseconds.

6

Timestamp

integer

The timestamp.

1595174436993

ServiceName

string

The name of the application.

arms-k8s-demo-subcomponent

TraceID

string

The trace ID.

ac1400a115951744369937024d****

SpanID

string

The span ID. You can obtain this value from the Trace Explorer page in the ARMS console.

be3d6dcf5750e***

Examples

Success response

JSON format

{
  "RequestId": "4C518054-852F-4023-ABC1-4AF95FF7****",
  "TraceInfos": [
    {
      "OperationName": "get***",
      "ServiceIp": "172.20.**.**",
      "Duration": 6,
      "Timestamp": 1595174436993,
      "ServiceName": "arms-k8s-demo-subcomponent",
      "TraceID": "ac1400a115951744369937024d****",
      "SpanID": "be3d6dcf5750e***"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.