commit | caa37b6a4f2c222b5c6469d39ed7aa4e0def067f | [log] [tgz] |
---|---|---|
author | Qiuxia Fan <fine0830@outlook.com> | Fri Sep 18 16:38:28 2020 +0800 |
committer | Qiuxia Fan <fine0830@outlook.com> | Fri Sep 18 16:38:28 2020 +0800 |
tree | 59f9c262e3a092150bbb951a99baccc9240f6617 | |
parent | 5485550e374edb9e3cf0ff7b5cad24ff343c132c [diff] |
docs: table
Apache SkyWalking Client-side JavaScript exception and tracing library.
npm install skywalking-client-js --save
import ClientMonitor from 'skywalking-client-js';
ClientMonitor.register({ service: 'test-ui', pagePath: 'http://localhost:8080/', serviceVersion: 'v1.0.0', });
Parameter | Type | Description | Required | Default Value |
---|---|---|---|---|
service | String | project id | true | - |
serviceVersion | String | project verison | true | - |
pagePath | String | project path | true | - |
jsErrors | Boolean | Support js errors monitoring | false | true |
apiErrors | Boolean | Support API errors monitoring | false | true |
resourceErrors | Boolean | Support resource errors monitoring | false | true |
useFmp | Boolean | Collect FMP (first meaningful paint) data of the first screen | false | false |
enableSPA | Boolean | Monitor the page hashchange event and report PV, which is suitable for single page application scenarios | false | false |
autoTracePerf | Boolean | Support automatic sending of performance data | false | true |
vue | Boolean | Support vue errors monitoring | false | true |
register()
After the SDK is initially completed, it calls the register() interface to revise some of the configuration items. For details of the SDK configuration item, see SDK reference.
register() grammar
ClientMonitor.register(params);
register() call parameters
|Parameter|Type|Description|Required|Default Value| |----|----|---------|----|----| |params|Object|Configuration items and values to be modified|true|-|
setPerformance()
After the page onLoad, call the setPerformance() interface to report the default performance metrics.
How to use setPerformance()
setPerformance() examples of use
import ClientMonitor from 'skywalking-client-js'; ClientMonitor.setPerformance({ reportUrl: 'http://example.com', service: 'skywalking-ui', serviceVersion: 'v8.1.0', pagePath: location.href, useFmp: true });
dev-subscribe@skywalking.apache.org
, follow the reply to subscribe the mail list.#skywalking
channel at Apache Slack. If the linke is not working, find the latest one at Apache INFRA WIKI.Apache 2.0