All Products
Search
Document Center

Application Real-Time Monitoring Service:SearchTracesByPage

Last Updated:Nov 05, 2024

Queries traces by page. You can query traces by time range, application name, IP address, span name, or tag.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:SearchTracesByPagenone
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StartTimelongYes

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

1595174400000
EndTimelongYes

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

1595210400000
RegionIdstringYes

The region ID.

cn-hangzhou
ServiceNamestringNo

The name of the application.

arms-k8s-demo-subcomponent
OperationNamestringNo

The name of the traced span.

/demo/queryNotExistDB/11
MinDurationlongNo

The minimum amount of time consumed by traces. Unit: milliseconds.

2
ReversebooleanNo

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

  • true: sorts the query results in reverse chronological order.
  • false: sorts the query results in chronological order.
false
ServiceIpstringNo

The IP address of the host where the application resides.

172.20.XX.XX
PageNumberintegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 100.

5
PidstringNo

The application ID.

b590lhguqs@9781be0f44dXXXX
ExclusionFiltersarray<object>No

The filter conditions.

objectNo
KeystringNo

The key that is used to filter the query results.

http.status_code
ValuestringNo

The value of the key that is used to filter the query results.

404
Tagsarray<object>No

The list of tags.

objectNo
KeystringNo

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

  • traceId: the ID of the trace.
  • serverApp: the name of the server application.
  • clientApp: the name of the client application.
  • service: the name of the interface.
  • 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: specifies whether the call is abnormal.
http.status_code
ValuestringNo

The value of the tag.

200
IsErrorbooleanNo

Specifies whether to include the traces of abnormal calls.

  • true: No
  • false (default): Yes
false

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The returned struct.

PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page.

5
Totalinteger

The total number of returned entries.

1601
TraceInfosarray<object>

The details of the returned traces.

TraceInfoobject
OperationNamestring

The name of the traced span.

/demo/queryException/12
ServiceIpstring

The IP address of the host where the application resides.

172.20.XX.XX
Durationlong

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

679
Timestamplong

The timestamp.

1595174436994
ServiceNamestring

The name of the application.

arms-k8s-demo-subcomponent
TraceIDstring

The trace ID.

ac1400a115951744369947025d****

Examples

Sample success responses

JSONformat

{
  "RequestId": "4C518054-852F-4023-ABC1-4AF95FF7****",
  "PageBean": {
    "PageNumber": 1,
    "PageSize": 5,
    "Total": 1601,
    "TraceInfos": [
      {
        "OperationName": "/demo/queryException/12",
        "ServiceIp": "172.20.XX.XX",
        "Duration": 679,
        "Timestamp": 1595174436994,
        "ServiceName": "arms-k8s-demo-subcomponent",
        "TraceID": "ac1400a115951744369947025d****"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-08The response structure of the API has changedView Change Details
2023-03-14The request parameters of the API has changedView Change Details