Browse Source

feat(recording): Add analytics event and logging.

j8
hristoterezov 6 years ago
parent
commit
62544188bd

+ 10
- 0
react/features/recording/components/Recording/StartRecordingDialogContent.web.js View File

@@ -4,6 +4,10 @@ import Spinner from '@atlaskit/spinner';
4 4
 import React, { Component } from 'react';
5 5
 import { connect } from 'react-redux';
6 6
 
7
+import {
8
+    createRecordingDialogEvent,
9
+    sendAnalytics
10
+} from '../../../analytics';
7 11
 import { translate } from '../../../base/i18n';
8 12
 import { authorizeDropbox, updateDropboxToken } from '../../../base/oauth';
9 13
 
@@ -161,6 +165,9 @@ class StartRecordingDialogContent extends Component<Props> {
161 165
      * @returns {void}
162 166
      */
163 167
     _onSignInClick() {
168
+        sendAnalytics(
169
+            createRecordingDialogEvent('start', 'signIn.button')
170
+        );
164 171
         this.props.dispatch(authorizeDropbox());
165 172
     }
166 173
 
@@ -172,6 +179,9 @@ class StartRecordingDialogContent extends Component<Props> {
172 179
      * @returns {void}
173 180
      */
174 181
     _onSignOutClick() {
182
+        sendAnalytics(
183
+            createRecordingDialogEvent('start', 'signOut.button')
184
+        );
175 185
         this.props.dispatch(updateDropboxToken());
176 186
     }
177 187
 }

+ 7
- 1
react/features/recording/functions.js View File

@@ -4,6 +4,8 @@ import { Dropbox } from 'dropbox';
4 4
 
5 5
 import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
6 6
 
7
+const logger = require('jitsi-meet-logger').getLogger(__filename);
8
+
7 9
 /**
8 10
  * Searches in the passed in redux state for an active recording session of the
9 11
  * passed in mode.
@@ -61,5 +63,9 @@ export function getDropboxData(
61 63
             spaceLeft: Math.floor((allocated - used) / 1048576)// 1MiB=1048576B
62 64
         };
63 65
 
64
-    }, () => undefined);
66
+    }, error => {
67
+        logger.error(error);
68
+
69
+        return undefined;
70
+    });
65 71
 }

Loading…
Cancel
Save