Przeglądaj źródła

Merge pull request #1169 from jitsi/page_reload_reason

Log more details on page reload
j8
Дамян Минков 8 lat temu
rodzic
commit
9f26270a98

+ 8
- 5
conference.js Wyświetl plik

@@ -387,7 +387,7 @@ class ConferenceConnector {
387 387
             // the app. Both the errors above are unrecoverable from the library
388 388
             // perspective.
389 389
             room.leave().then(() => connection.disconnect());
390
-            APP.UI.showPageReloadOverlay();
390
+            APP.UI.showPageReloadOverlay(err);
391 391
             break;
392 392
 
393 393
         case ConferenceErrors.CONFERENCE_MAX_USERS:
@@ -550,7 +550,8 @@ export default {
550 550
                 // - connection dropped(closed by Strophe unexpectedly
551 551
                 //   possible due too many transport errors)
552 552
                 logger.error("XMPP connection error: " + errMsg);
553
-                APP.UI.showPageReloadOverlay();
553
+                APP.UI.showPageReloadOverlay(
554
+                    "xmpp-conn-dropped:" + errMsg);
554 555
                 connection.removeEventListener(
555 556
                     ConnectionEvents.CONNECTION_FAILED, handler);
556 557
                 // FIXME it feels like the conference should be stopped
@@ -1736,14 +1737,16 @@ export default {
1736 1737
      * @param {string} name the event name
1737 1738
      * @param {int} value the value (it's int because google analytics supports
1738 1739
      * only int).
1740
+     * @param {string} label short text which provides more info about the event
1741
+     * which allows to distinguish between few event cases of the same name
1739 1742
      * NOTE: Should be used after conference.init
1740 1743
      */
1741
-    logEvent(name, value) {
1744
+    logEvent(name, value, label) {
1742 1745
         if(JitsiMeetJS.analytics) {
1743
-            JitsiMeetJS.analytics.sendEvent(name, {value});
1746
+            JitsiMeetJS.analytics.sendEvent(name, {value, label});
1744 1747
         }
1745 1748
         if(room) {
1746
-            room.sendApplicationLog(JSON.stringify({name, value}));
1749
+            room.sendApplicationLog(JSON.stringify({name, value, label}));
1747 1750
         }
1748 1751
     },
1749 1752
     /**

+ 5
- 2
modules/UI/UI.js Wyświetl plik

@@ -1092,10 +1092,13 @@ UI.notifyFocusDisconnected = function (focus, retrySec) {
1092 1092
 /**
1093 1093
  * Notify the user that the video conferencing service is badly broken and
1094 1094
  * the page should be reloaded.
1095
+ *
1096
+ * @param {string} a label string identifying the reason for the page reload
1097
+ * which will be included in details of the log event.
1095 1098
  */
1096
-UI.showPageReloadOverlay = function () {
1099
+UI.showPageReloadOverlay = function (reason) {
1097 1100
     // Reload the page after 10 - 30 seconds
1098
-    PageReloadOverlay.show(10 + RandomUtil.randomInt(0, 20));
1101
+    PageReloadOverlay.show(10 + RandomUtil.randomInt(0, 20), reason);
1099 1102
 };
1100 1103
 
1101 1104
 /**

+ 5
- 2
modules/UI/reload_overlay/PageReloadOverlay.js Wyświetl plik

@@ -113,8 +113,10 @@ export default {
113 113
      *
114 114
      * @param {number} timeoutSeconds how many seconds before the conference
115 115
      * reload will happen.
116
+     * @param {string} reason a label string identifying the reason for the page
117
+     * reload which will be included in details of the log event
116 118
      */
117
-    show(timeoutSeconds) {
119
+    show(timeoutSeconds, reason) {
118 120
 
119 121
         if (!overlay) {
120 122
             overlay = new PageReloadOverlayImpl(timeoutSeconds);
@@ -124,7 +126,8 @@ export default {
124 126
             // FIXME (CallStats - issue) this event will not make it to
125 127
             // the CallStats, because the log queue is not flushed, before
126 128
             // "fabric terminated" is sent to the backed
127
-            APP.conference.logEvent('page.reload');
129
+            APP.conference.logEvent(
130
+                'page.reload', undefined /* value */, reason /* label */);
128 131
         }
129 132
         overlay.show();
130 133
     }

Ładowanie…
Anuluj
Zapisz