Help Center/ Cloud Service Engine/ API Reference/ CSE API/ Microservice Governance/ Querying Microservice Reporting Information
Updated on 2025-04-25 GMT+08:00

Querying Microservice Reporting Information

Function

This API is used to query microservice reporting information.

URI

GET /v3/{project_id}/csemonitor/metric

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which must be unique. The value contains 1 to 64 characters.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

service

Yes

String

List of service names, which are separated by commas (,).

instance

No

String

Instance name.

function

No

String

Function name.

flag

No

String

Batch query flag.

Request

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

X-Enterprise-Project-ID

No

String

If this parameter is not set, the default enterprise project is default and the ID is 0.

Default value: 0

Content-Type

Yes

String

Set it to application/json;charset=UTF-8.

Accept

Yes

String

Set it to application/json.

Response

Status code: 200
Table 4 Response body parameters

Parameter

Type

Description

OK

Array of MetricInfo objects

Query result.

Table 5 MetricInfo

Parameter

Type

Description

time

Long

Timestamp.

appId

String

Service appId.

version

String

Service version.

qps

Double

Number of requests per second.

latency

Double

Delay, in milliseconds.

rate

Double

Success rate (%). Value range: 0–100.

failureRate

Double

Failure rate (%). Value range: 0–100.

total

Long

Total number of requests.

breakerRateAgg

Float

Average circuit breaker rate.

circuitBreakerOpen

Boolean

Current circuit breaker status.

failure

Long

Total number of failures.

shortCircuited

Long

Total number of short circuits.

semaphoreRejected

Long

Total number of rejected semaphores.

threadPoolRejected

Long

Total number of rejected threads in the thread pool.

countTimeout

Long

Total number of timeout requests.

l995

double

Top 99.5% of all request latency sorted in ascending order.

l99

double

Top 99% of all request latency sorted in ascending order.

l90

double

Top 90% of all request latency sorted in ascending order.

l75

double

Top 75% of all request latency sorted in ascending order.

l50

double

Top 50% of all request latency sorted in ascending order.

l25

double

Top 25% of all request latency sorted in ascending order.

l5

double

Top 5% of all request latency sorted in ascending order.

name

String

Name.

serviceId

String

Service ID.

instanceCount

Long

Number of service instances.

environment

String

Environment name.

diagnosis

Array of Diagnosisobject

Service diagnosis result.

instanceId

String

Instance ID.

thread

Integer

Number of threads.

cpu

Double

CPU usage (%).

memory

Map object

Memory usage (%).

functionCount

Long

Number of functions.

customs

Map object

Custom variable.

providersCache

Array of ProviderCache object

Server instance set.

functionType

String

Function type.

Table 6 ProviderCache

Parameter

Type

Description

appId

String

Application ID.

microserviceName

String

Service name.

detail

String

Details.

pulledInstances

Array of ProviderInstance object

Service provider instance information.

status

String

Status information.

Table 7 ProviderInstance

Parameter

Type

Description

instanceId

String

Instance ID.

endpoints

Array of String

List of instance access points.

hostName

String

Instance domain name.

timestamp

String

Timestamp.

Table 8 Diagnosis

Parameter

Type

Description

instanceCache

Array of InstanceCache object

Service instance cache result.

Table 9 InstanceCache

Parameter

Type

Description

status

String

Check status.

Enumerated values:

  • NORMAL
  • ABNORMAL
  • UNKNOWN

timestamp

Long

Timestamp.

producers

Array of Producer object

Service provider list.

checkTime

Long

Check time. If an exception occurs, the latest exception time is displayed. Otherwise, the latest check time is displayed.

latestStatus

String

Check status.

Enumerated values:

  • NORMAL
  • ABNORMAL
  • UNKNOWN
Table 10 Producer

Parameter

Type

Description

status

String

Check status.

Enumerated values:

  • NORMAL
  • ABNORMAL
  • UNKNOWN

appId

String

Application ID.

microserviceName

String

Microservice name.

detail

String

Details.

Status code: 400
Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

detail

String

Location details.

Status code: 500
Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

detail

String

Location details.

Example Request

GET https://{endpoint}/v3/{project_id}/csemonitor/metric

Example Response

Status code: 200

OK

[
  [
    {
      "time": 1733973104652,
      "appId": "weathermap",
      "version": "0.0.2",
      "qps": 0.0,
      "latency": 0.0,
      "failureRate": 0.0,
      "total": 0,
      "breakerRateAgg": 0.0,
      "circuitBreakerOpen": false,
      "failure": 0,
      "shortCircuited": 0,
      "semaphoreRejected": 0,
      "threadPoolRejected": 0,
      "countTimeout": 0,
      "l995": 0,
      "l99": 0,
      "l90": 0,
      "l75": 0,
      "l50": 0,
      "l25": 0,
      "l5": 0,
      "serviceId": "da21c8749d7ca08047b7d8da63f79e296127c21b",
      "instanceCount": 10,
      "environment": "",
      "diagnosis": {
        "instanceCache": null
      },
      "name": "weather"
    }
  ]
]

Status Code

Status Code

Description

200

OK

400

Bad Request

500

Internal Server Error

Error Code

See Error Codes.