Help Center > > API Reference> APIs> Querying Call Chains

Querying Call Chains

Updated at: Mar 05, 2019 GMT+08:00

Function

This API is used to query call chain data by search criteria.

URI

GET /v1/{projectId}/ats/traces

Request Message

Path Parameter

The path parameter is listed in Table 1 Path parameter.

Table 1 Path parameter

Parameter

Type

Description

projectId

string

Project ID.

Request Parameter

Request parameters are listed in Table 2 Request parameters.

Table 2 Request parameters

Parameter

Mandatory

Type

Value Range

Description

startTime

Yes

long

<endTime

Start time for querying call chains (unit: ms).

endTime

Yes

long

>startTime

End time for querying call chains (unit: ms).

application

Yes

string

For details, see Querying a Service List.

Service name.

The letters in the service name must be lowercase letters. For example: test-service.

monitorGroup

No

string

For details, see Querying an Application List.

Application name.

instance

No

string

For details, see Querying a Service Instance List.

Instance name.

The letters in the instance name must be lowercase letters. For example: test-service-4195149926-0fvhn.

transaction

No

string

For details, see Querying a Service Transaction List.

Transaction name, for example: GET_/rest/healthz/*.

limit

No

int

The value must be an integer greater than 0 but less than or equal to 1000.

The default value is 20. A maximum of 1000 records can be returned per query.

duration

No

int

The value must be an integer greater than or equal to 0.

The default value is 0, which indicates the minimum time in a call chain (unit: ms).

status

No

int

1: Failed to execute the transaction.

Transaction status.

By default, data associated with successful and failed calls is queried. If the value is 1, only data associated with failed calls is queried.

Request Example

/v1/0/ats/traces?startTime=1506214200000&endTime=1506214428000&application=datamgmtservice&monitorGroup=apm&limit=1

Response Message

Response Parameter

Response parameters are listed in Table 3 Response parameters.

Table 3 Response parameters

Parameter

Type

Description

errorCode

string

Response error code.

SVCSTG.ATS.2000: Query succeeded.

SVCSTG.ATS.400101: Parameter verification failed.

SVCSTG.ATS.200103: No call chain data found.

errorMessage

string

Description of the response error message.

responseInfo

result

Call chain query result.

Table 4 Data structure of the result field

Parameter

Type

Description

count

int

Number of call chains queried this time.

traceChains

List<TraceChainBase>

Call chain data set.

Table 5 Data structure of the TraceChainBase field

Parameter

Type

Description

traceId

string

ID of the call chain, which is globally unique.

type

string

Service type.

status

int

Call response status.

duration

long

Time required for an API action (unit: us).

application

string

Service name.

instance

string

Instance name.

transaction

string

API/service name.

startTime

long

Time to start an API action (unit: us).

endTime

long

Time to end an API action (unit: us).

address

string

IPv4 address of the client.

Response Example

{
  "errorCode": "SVCSTG.ATS.2000",
  "errorMessage":null,
  "responseInfo": {
    "count": 1,
    "traceChains": [
      {
        "traceId": "000000004fa102d1",
        "type": "TOMCAT_METHOD",
        "status": 0,
        "duration": 10000,
        "application": "datamgmtservice",
        "instance": "datamgmtservice-4267750592-2ngmz",
        "transaction": "/rest/plat/sysmgr/v1/sysagent/alarm/report",
        "startTime": 1506214214095000,
        "endTime": 1506214214105000,
        "address": "192.168.0.1"
      }
    ]
  }
}

Status Code

  • Normal
    The status code is listed in Table 6 Status code.
    Table 6 Status code

    Status Code

    Description

    200

    The request has succeeded.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel