Avoid throwing an exception if an analytics handler throws one. Emit a warning
though, so the problem can be eventually caught and fixed in the handler.
* wip: initial version of the new AnalyticsAdapter.
* ref: Restructures the ICE duration and state change events.
* ref: Restructures the JitsiLocalTrack events.
* ref: Restructures the TTFM events.
* ref: Updates the user feedback event.
* ref: Restructures the _CONNECTION_TIMES_ and TTFM events.
* ref: Restructures the BRIDGE_DOWN and NO_DATA_FROM_SOURCE events.
* ref: Restructures the FOCUS_LEFT event.
* ref: Restructures the DATA_CHANNEL_OPEN event.
* ref: Removes the ICE_FAILED event (it is a duplicate of a state change event).
* ref: Restructures the device list events.
Uses one event per device, since the new format does not allow non-atomic attributes.
* fix: Does not obey "unmute" commands from the focus.
* ref: Restructures the "remotely muted" event.
* ref: Restructures the CONFERENCE_ERROR events.
* ref: Removes the CONNECTION_INTERRUPTED event
We can use ICE_STATE_CHANGED instead.
* ref: Renames isreconnect to isReconnect.
* ref: Removes the CONNECTION_RESTORED event. Use ICE state changes instead.
* ref: Restructures the p2p events.
* ref: Restructures the jingle events.
* ref: Restructures the RTP statistics event.
* ref: Restructures the CONNECTION_FAILED and DISCONNECTED events.
* ref: Restructures the getUserMedia analytics events.
* ref: Cleans up AnalyticsEvents and restructures some of the events.
* fix: Adds error logs to the analytics adapter.
* ref: Refactor Statistics.sendEventToAll
Renames to sendEventAndLog, supports the object-based API, uses the
function where appropriate.
* fix: Addresses PR feedback.
* fix: Addresses Lyubomir's feedback.
* ref: Remove unused functions, adds documentation.
* feat: Adds a Statistics.sendAnalytics shortcut.
* ref: Uses the conference name as the default containerId.
* fix: Adrdesses Lenny's feedback.
* fix: Addresses more feedback.
* fix: Uses 'operational' as the default event type.
* doc: Updates the documentation.
* fix: Fixes adding of permanent properties.
* ref: Uses consistent naming for events' attributes.
Uses "_" as a separator instead of camel case or ".".
* feat: Adds the conference name as a permanent property automatically.
* ref: Don't expose Setting.machineId.
* fix: Adds a "p2p" attribute to jingle events.
* ref: Uses "action" instead of "name".
* ref: Uses underscore in events' attribute names.
* ref: Logs a message to the logger/console
instead of callstats in sendAnalyticsAndLog().
* ref: Simplifies the logic for handling an incoming jingle session-initiate.
* fix: Don't redundantly log cross region
information under a field name called "label".
* cleanup: Simplifies code. Adds the userAgent as a permanent property
for statistics (so that the client doesn't have to).
* ref: Names the parameter which specifies the name of the event "eventName".
* ref: Extracts event names to AnalyticsEvents.
* ref: Exports and imports constants individually.
* fix: Fixes CONNECTION_TIMES event names.
* ref: Arranges constants alphabetically.
* ref: Adds line breaks.
AnalyticsAdapter is initialized on file load. The constructor
calls a method that calls Object.assign. All this happens
before jitsi-meet has loaded polyfills. So, instead
initialize permanentProperties inline with the expected
values, avoiding Object.assign.
Because the implementation of LocalStorage in jitsi-meet at the time
of this writing is asynchronous with respect to loading and saving,
delay the generation of machineId in order to allow LocalStorage to
load any previously saved value.
Our JSHint configuration is not extensive and we have excluded multiple
files from linting. Additionally, we have seen JSHint to be unable to
parse newer ECMAScript features such as the object spread operator
(proposal).
On the other hand, we have seen ESLint to beautifully work on React and
React Native source code in addition to ES2015 and later. Introduce
ESLint alongside JSHint as an intermediate step to eventually switching
from JSHint to ESLint.
As our source code does not fully follow even the JSHint rules we have,
it is very difficult to introduce ESLint with many rules. At the
beginning, introduce it with as little rules as possible. Morever,
ESLint is able to automatically fix certain rule offenders so once we
have ESLint merged we can incrementally add new rules while keeping our
commits' modification on as little subjects as possible.