Skip to main content

Request analysis

1. Packet loss rate

Endpoint:

Method: POST
Type: RAW
URL: {{host}}/adhoc/query

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"packetLossRate"
],
"dimensions": [
"timeStr"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"avg": {
"metric": "packetLossRate"
},
"render": "list",
"contentType": "json"
}

Example Request: Packet Loss Rate

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"packetLossRate"
],
"dimensions": [
"timeStr"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"avg": {
"metric": "packetLossRate"
},
"render": "list",
"contentType": "json"
}

Example Response: Packet Loss Rate

[
{
"packetLossRate": "71.06",
"timeStr": 1629950220000
},
{
"packetLossRate": "71.43",
"timeStr": 1629950400000
}
]

Status Code: 200

2. List of key requests

Endpoint:

Method: POST
Type: RAW
URL: {{host}}/adhoc/query

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"requestCount",
"responseTime",
"requestErrorRate",
"httpErrorRate",
"networkErrorRate",
"throughput"
],
"dimensions": [
"keyUrlId"
],
"filters": [
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
},
{
"name": "keyUrlId",
"value": [
0
],
"operator": ">"
},
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
}
],
"orderByExprs": "requestCount desc",
"render": "list"
}

3. Response time percentile

Endpoint:

Method: POST
Type: RAW
URL: {{host}}/adhoc/query

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA_SKETCH",
"queryMetrics": [
{
"name": "requestCount",
"type": "tooltip"
},
{
"name": "responseTime50"
},
{
"name": "responseTime75"
},
{
"name": "responseTime95"
},
{
"name": "responseTime99"
}
],
"dimensions": [

],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"render": "list"
}

More example Requests/Responses:

Example Request: Response Time Percentile

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA_SKETCH",
"queryMetrics": [
{
"name": "requestCount",
"type": "tooltip"
},
{
"name": "responseTime50"
},
{
"name": "responseTime75"
},
{
"name": "responseTime95"
},
{
"name": "responseTime99"
}
],
"dimensions": [

],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"render": "list"
}

Example Response: Response Time Percentile

// 单位 ms
[
{
"responseTime99": 5074, // 99percentage
"responseTime75": 142, // 75percentage
"responseTime95": 576, // 95percentage
"responseTime50": 89 // 50percentage
}
]

Status Code: 200

4. Response Time Percentile Trend

Endpoint:

Method: POST
Type: RAW
URL: {{host}}/adhoc/query

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA_SKETCH",
"queryMetrics": [
{
"name": "requestCount",
"type": "tooltip"
},
{
"name": "responseTime50"
},
{
"name": "responseTime75"
},
{
"name": "responseTime95"
},
{
"name": "responseTime99"
}
],
"dimensions": [
"timeStr"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"render": "list"
}

Example Request: Response Time Percentile Trend

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA_SKETCH",
"queryMetrics": [
{
"name": "requestCount",
"type": "tooltip"
},
{
"name": "responseTime50"
},
{
"name": "responseTime75"
},
{
"name": "responseTime95"
},
{
"name": "responseTime99"
}
],
"dimensions": [
"timeStr"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"render": "list"
}

Example Response: Response Time Percentile Trend

[
{
"responseTime99": 5074, // 99percentage
"responseTime75": 142, // 75percentage
"responseTime95": 576, // 95percentage
"responseTime50": 89, // 50percentage
"timeStr": 1629786240000
},
{
"responseTime99": 4661,
"responseTime75": 185,
"responseTime95": 1011,
"responseTime50": 103,
"timeStr": 1629786360000
}
]

Status Code: 200

5. List of domain name requests

Endpoint:

Method: POST
Type: RAW
URL: {{host}}/adhoc/query

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"requestCount",
"throughput",
"responseTime",
"networkTime",
"dnsTime",
"httpErrorRate",
"connectTime",
"sslTime",
"firstPacketTime",
"remainPacketTime",
"localQueueTime",
"networkErrorRate",
"trafficConsumption",
"networkSpeed",
"bytesSend",
"bytesReceived",
"httpErrorCount",
"networkErrorCount",
"slowCount",
"slowRequestRate"
],
"dimensions": [
"hostId",
"requestType"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"orderByExprs": "requestCount DESC",
"limit": 1000,
"render": "list"
}

Example Request: Domain Name Request List

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"requestCount",
"throughput",
"responseTime",
"networkTime",
"dnsTime",
"httpErrorRate",
"connectTime",
"sslTime",
"firstPacketTime",
"remainPacketTime",
"localQueueTime",
"networkErrorRate",
"trafficConsumption",
"networkSpeed",
"bytesSend",
"bytesReceived",
"httpErrorCount",
"networkErrorCount",
"slowCount",
"slowRequestRate"
],
"dimensions": [
"hostId",
"requestType"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"orderByExprs": "requestCount DESC",
"limit": 1000,
"render": "list"
}

Example Response: Domain Name Request List

[
{
"requestCount": 2976,
"hostName": "zhihu.com",
"requestType": 2,
"trafficConsumption": "5025.195",
"responseTime": 2509,
"localQueueTime": 34,
"networkErrorCount": 744,
"hostId": 9514,
"requestTypeName": "cdn-self service",
"slowCount": 744,
"networkTime": 2475,
"httpErrorRate": "50",
"remainPacketTime": 60,
"networkErrorRate": "25",
"networkSpeed": "2002.09",
"bytesReceived": "1.367",
"slowRequestRate": "25",
"dnsTime": 123,
"connectTime": 49,
"sslTime": 108,
"firstPacketTime": 223,
"throughput": "16.533",
"bytesSend": "5023.828",
"httpErrorCount": 1488
}
]

Status Code: 200

6. Network latency

Endpoint:

Method: POST
Type: RAW
URL: {{host}}/adhoc/query

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"pingTime",
"pingSuccessCount"
],
"dimensions": [
"timeStr"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"avg": {
"metric": "pingTime"
},
"render": "list",
"contentType": "json"
}

Example Request: Network Latency

Body:

{
"timePeriod": {{timePeriod}},
"endTime": {{endTime}},
"datasource": "APP_NETWORK_DATA",
"metrics": [
"pingTime",
"pingSuccessCount"
],
"dimensions": [
"timeStr"
],
"filters": [
{
"name": "countryId",
"value": [
48
],
"groupType": "region"
},
{
"name": "mobileAppId",
"value": [
{{mobileAppId}}
],
"operator": "IN"
}
],
"limit": -1,
"avg": {
"metric": "pingTime"
},
"render": "list",
"contentType": "json"
}

Example Response: Network Latency

[
{
"pingTime": 1810, // ping duration
"pingSuccessCount": 270, // ping success count
"timeStr": 1629950220000 // timestamp
},
{
"pingTime": 1769,
"pingSuccessCount": 490,
"timeStr": 1629950400000
}
]

Status Code: 200