Skip to main content

Operation Analysis

Operation list

POST /opera/list

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
timePeriodNumberNoThe parameter defaults to 30 minutes
endTimeStringNoEnd time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)
requestOnlybooleanNoFilter operations without network requests, default true

Return data:


[
{
"operaName": "getReport",
"path": "pages/index/index",
"operaAliasName": "Get report",
"operaCount": 2,
"operaRequestCount": 1,
"operaTime": 482.0,
"operaRequestTime": 455.0,
"operaServerTime": 0.0,
"operaAvailableRate": 0.0
},
...
]

Operation details

Operation user experience diagram

POST /chart/opera-performance-trend

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
operaNameStringNoOperation Name
pathStringNoPage name
timePeriodNumberNoThe parameter defaults to 30 minutes
endTimeStringNoEnd time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)

Return results: Highcharts chart general return results

Time-consuming distribution

Operating time:

POST /chart/opera-distribution-time

Operation request time:

POST /chart/opera-distribution-request-time

Time taken to operate the server:

POST /chart/opera-distribution-server-time

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
operaNameStringNoOperation Name
pathStringNoPage name
timePeriodNumberNoThe parameter defaults to 30 minutes
endTimeStringNoEnd time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)

Return results:


{
"series": [
{
"name": "proportion",
"unit": "%",
"data": [
0.00,
0.00,
0.00,
33.33,
0.00,
33.33,
33.33,
0.00
]
},
{
"name": "number of times",
"unit": "",
"data": [
0,
0,
0,
1,
0,
1,
1,
0
]
}
]
}

Map component

Reference application map component

Additional parameters:

Request parametersTypeRequired parametersDescription
operaNameStringNoOperation Name
pathStringNoPage name

##Exception tracking

TOP5 dimension indicator pie chart

POST /opera/pie

dimension option list:

namedimension
networkTypenetworkType
WeChat versionwechatVersion
Region and CarrierregionId,carrierId
System versionsystem
DevicedeviceType
Mini program sdk versionsdkVersion

Request parameters:

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
pathStringNoPage path
operaNameStringNoOperation Name
dimensionTypeStringis thedimension key, which distinguishes the pie chart type, refer to the dimension option list
timePeriodNumberNoThe parameter defaults to 30 minutes
endTimeStringNoEnd time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)
statusFilterStringis theexception type, separated by ,, for example, when all exception status is selected: slow,netError,jsError,stuck, which in turn means slow page, network error, js error, stuck

Return results:

[
{
"name": "2G",
"value": 1,
"dimension": {
"networkType": "2G"
}
},
...
{
"name": "Other", // Data records outside top5, no dimension item
"value": 10
}
]

Operation trace list

POST /opera/trace/list

Note: Request Content-Type: application/json

Request example:

{
"timePeriod": 30,
"endTime": "",
"mpId": 111,
"path": "xxx",
"operaName": "xxx",
"statusFilter": "slow,fail", //Reference pie chart
"filter": [
{
"dimension": "ip",
"values": ["192.168.1.100", "192.168.1.111"],
"searchValue": "192.168.1"
},
{
"dimension": "regionId,carrierId",
"values": ["4811,12000", "4811,12000"]
}
...
]
}

Return data:

[
{
"timestamp": "2019-11-27 15:16",
"id": "YpG4q24Bw-wCxOz_N0tj",
"path": "pages/index/index",
"operaName": "sendOneRequest",
"sid": "48cac7ec-7a22-48b0-bc5f-93c3e957abef",
"uid": "5847de28-2b35-4d6e-b977-ff54a685c7d4",
"ip": "192.168.5.149",
"system": "Android 5.0",
"deviceType": "Nexus 5",
"wechatVersion": "7.0.4",
"networkType": "wifi",
"regionId": 0,
"cityId": 0,
"carrierId": 0,
"region": "unknown",
"city": "Unknown",
"carrier": "unknown",
"operaTime": 1604,
"operaRequestTime": 1603,
"operaServerTime": 0,
"operaRequestCount": 1,
"operaServerCount": 0
},
...
]

Request analysis

POST /opera/request-list

Request parameters:

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
operaNameStringNoOperation Name
pathStringNoPage name
timePeriodNumberNoThe parameter defaults to 30 minutes
endTimeStringNoEnd time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)

Return data:

[
{
"netCount": 3,
"applicationServerTime": 0,
"netErrorRate": 0.0,
"netSlowRatio": 0.0,
"responseTime": 84.0,
"host": "demo.tingyun.com",
"uri": "/mp-mock/baidu/list"
}
]

Operation trace

Operation trace details

POST /opera/trace/detail

Request parameters:

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
pathStringNoPage path
operaNameStringNoOperation Name
timePeriodNumberisThe parameter defaults to 30 minutes
endTimeStringisend time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)
traceIdStringisoperate traceId, operate the id field of the trace list

Return data:


{
"timestamp": "2019-11-27 15:16",
"mpId": 2065,
"path": "pages/index/index",
"operaName": "sendOneRequest",
"sid": "48cac7ec-7a22-48b0-bc5f-93c3e957abef",
"uid": "5847de28-2b35-4d6e-b977-ff54a685c7d4",
"ip": "192.168.5.149",
"system": "Android 5.0",
"deviceType": "Nexus 5",
"wechatVersion": "7.0.4",
"networkType": "wifi",
"countryId": 0,
"regionId": 0,
"cityId": 0,
"carrierId": 0,
"region": "unknown",
"city": "Unknown",
"carrier": "unknown",
"traceData": {
"data": {
"dataset": {
"methodName": "sendOneRequest"
},
"target": {
"offsetTop": 829,
"x": 193,
"y": 851,
"offsetLeft": 0,
"id": ""
}
},
"prev_path": "pages/about/about",
"count": 0,
"start": 1574839003687,
"requests": [
{
"status_code": 500,
"method": "GET",
"prev_path": "pages/about/about",
"count": 0,
"start": 1574839003687,
"server_instance_id": 0,
"type": "request",
"server_id": 0,
"opera_name": "sendOneRequest",
"url": "https://reportalpha1.tingyun.com/mpserver/filesuccess",
"fail_message": "{\"code\":\"success\"}",
"duration": 1603,
"path": "pages/index/index",
"rec": 18,
"requestId": 1,
"cb_time": 0,
"end": 1574839005290,
"id": 0,
"send": 0
}
],
"type": "event",
"duration": 1604,
"path": "pages/index/index",
"apis": [],
"name": "sendOneRequest",
"end": 1574839005291,
"id": 1,
"info": {
"windowHeight": 518,
"routeTrack": [
{
"route": "pages/index/index",
"timestamp": 1574838982066
},
{
"route": "pages/about/about",
"timestamp": 1574838991094
},
{
"route": "pages/index/index",
"timestamp": 1574839000551
}
],
"ua": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Mobile Safari/537.36 wechatdevtools/1.02.1910120 MicroMessenger/7.0.4 webview/ ",
"windowWidth": 360
}
},
"operaTime": 1604,
"operaRequestTime": 1603,
"operaServerTime": 0,
"operaRequestCount": 1,
"operaServerCount": 0
}

Recent operation trace list

POST /opera/trace/recent-list

Request parameters:

Request parametersTypeRequired parametersDescription
mpIdNumberismini program id
timePeriodNumberNoThe parameter defaults to 30 minutes
endTimeStringNoEnd time format yyyy-MM-dd HH:mm For example (2018-02-07 17:39)
limitNumberNoThe first 20 trace records are checked by default and sorted by time

Return data:


[
{
"traceId": "f758c228c1e148ef8f6e792e1cd91fbf",
"timestamp": "2018-11-12 16:01"
}
]