You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/08/26 02:54:07 UTC

[skywalking-client-js] 47/48: fix: address pr

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-client-js.git

commit 7be438b5d27e28d5cf4bd0c20aeef1efc5e1e4a2
Author: Qiuxia Fan <fi...@outlook.com>
AuthorDate: Tue Aug 11 09:58:46 2020 +0800

    fix: address pr
---
 src/monitor.ts            | 6 +++---
 src/performance/perf.ts   | 2 +-
 src/performance/type.d.ts | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/monitor.ts b/src/monitor.ts
index 025dc76..442ede0 100644
--- a/src/monitor.ts
+++ b/src/monitor.ts
@@ -21,8 +21,8 @@ import Performance from './performance/index';
 
 const ClientMonitor = {
   customOptions: {
-    jsErrors: true,
-    apiErrors: true, // ajax promise
+    jsErrors: true, // vue, js and promise errors
+    apiErrors: true,
     resourceErrors: true,
     autoTracePerf: true, // trace performance detail
     useFmp: false, // use first meaningful paint
@@ -38,12 +38,12 @@ const ClientMonitor = {
 
     if (this.customOptions.jsErrors) {
       JSErrors.handleErrors({reportUrl, serviceName});
+      PromiseErrors.handleErrors({reportUrl, serviceName});
       if (this.customOptions.vue) {
         VueErrors.handleErrors({reportUrl, serviceName}, this.customOptions.vue);
       }
     }
     if (this.customOptions.apiErrors) {
-      PromiseErrors.handleErrors({reportUrl, serviceName});
       AjaxErrors.handleError({reportUrl, serviceName});
     }
     if (this.customOptions.resourceErrors) {
diff --git a/src/performance/perf.ts b/src/performance/perf.ts
index 3087c07..b9e7cf5 100644
--- a/src/performance/perf.ts
+++ b/src/performance/perf.ts
@@ -44,7 +44,7 @@ class PagePerf {
         domAnalysisTime: timing.domInteractive - timing.responseEnd,
         fptTime: timing.responseEnd - timing.fetchStart, // First Paint Time or Blank Screen Time
         domReadyTime: timing.domContentLoadedEventEnd - timing.fetchStart,
-        loadPage: timing.loadEventStart - timing.fetchStart, // Page full load time
+        loadPageTime: timing.loadEventStart - timing.fetchStart, // Page full load time
         resTime: timing.loadEventStart - timing.domContentLoadedEventEnd, // Synchronous load resources in the page
         // Only valid for HTTPS
         sslTime: location.protocol.includes('https') ? timing.connectEnd - timing.secureConnectionStart : undefined,
diff --git a/src/performance/type.d.ts b/src/performance/type.d.ts
index 07e0b62..d53bc11 100644
--- a/src/performance/type.d.ts
+++ b/src/performance/type.d.ts
@@ -34,7 +34,7 @@ export type IPerfDetail = {
   domAnalysisTime: number | undefined; // Dom parsing time
   fptTime: number | undefined; // First Paint Time or Blank Screen Time
   domReadyTime: number | undefined; // Dom ready time
-  loadPage: number | undefined; // Page full load time
+  loadPageTime: number | undefined; // Page full load time
   resTime: number | undefined; // Synchronous load resources in the page
   sslTime: number | undefined; // Only valid for HTTPS
   ttlTime: number | undefined; // Time to interact