All Products
Search
Document Center

Application Real-Time Monitoring Service:SearchTraces

Last Updated:Nov 05, 2024

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

Operation description

Note A maximum of 100 data entries can be returned each time this operation is called. If you want to query all existing traces, we recommend that you call the SearchTracesByPage operation. For more information, see SearchTracesByPage .

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:SearchTracesnone
  • 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
PidstringNo

The application ID.

b590lhguqs@9781be0f44dXXXX
Tagarray<object>No

The list of tags.

objectNo
KeystringNo

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: specifies whether the call is abnormal.
  • hasTprof: contains only thread profiling.
http.status_code
ValuestringNo

The value of the tag.

200
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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

4C518054-852F-4023-ABC1-4AF95FF7****
TraceInfosarray<object>

The details of the returned traces.

TraceInfoobject
OperationNamestring

The name of the traced span.

get***
ServiceIpstring

The IP address of the host where the application resides.

172.20.**.**
Durationlong

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

6
Timestamplong

The timestamp.

1595174436993
ServiceNamestring

The name of the application.

arms-k8s-demo-subcomponent
TraceIDstring

The trace ID.

ac1400a115951744369937024d****

Examples

Sample success responses

JSONformat

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

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