Add a performance stat around long tasks. Chrome supports PerformanceObserver API that lets us
register for long tasks event. Any task that takes longer than 50ms is considered a long task.
Partially reverts 24bda8e and uses domain/roomname to report to cs.
To be sure we always report room name in small case and as mobile and jigasi report this way it will take time for them to adopt which leads to wrong stats.
When the main domain advertises component with type 'speakerstats' every participant will send message to the component with the name of the room where this happen.
* 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().
Reports ssrc to callstats when screen sharing is started. (#657)
Adds rtc.LOCAL_TRACK_SSRC_UPDATED event to be emitted when ssrc is updated for a local track.
Fixes adding rtc listeners for CREATE_ANSWER_FAILED, CREATE_OFFER_FAILED, SET_LOCAL_DESCRIPTION_FAILED, SET_REMOTE_DESCRIPTION_FAILED.
* 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.
Uses optional statsId to report to callstats and push it to presence. (#608)
* Uses optional statsId to report to callstats and push it to presence.
The feature is behind a flag which is disabled by default.
* Renames statsId to statsID.
* Fixes doc.
ESLint 4.8.0 discovers a lot of error related to formatting. While I
tried to fix as many of them as possible, a portion of them actually go
against our coding style. In such a case, I've disabled the indent rule
which effectively leaves it as it was before ESLint 4.8.0.
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.
* feat: multiple, simultaneous RTP stats
Makes it possible to have remote RTP stats running for more than one
peerconnection at a time.
* feat(stats): report RTT all the time
Will report JVB RTT (and end to end) while in P2P mode and vice versa.
* fix(JitsiConferenceEvents): remove CONNECTION_STATS
CONNECTION_STATS event is no longer emitted.
* fix(AvgRTPStatsReported): users with no video
Do not include FPS == 0 in average remote FPS calculation. Report NaN
for local FPS when video muted or no video device. NaN will be reported
for avg remote FPS if no video is received.
* fix(AvgRTPStatsReported): reset total packet loss
* feat(AvgRTPStatsReported): report 'screen' FPS
Will report average FPS for screen videos separately from camera videos,
but only if available (camera video reports NaN FPS when not available).
* fix(AvgRTPStatsReported): end2endRTT
Needs to report JSON with value.
* feat(AVG RTP stats): separate audio and video bitrate
Will report average audio and video bitrates separately.
* doc(JitsiConference): try to improve comment
* fix(AvgRTPStatsReporter): remove confusing reset
There's no a clear reason for doing reset there.
* ref(AvgRTPStatsReporter): rename var
fix(stats): lazy initialization for statistics Sets
Internet Explorer is throwing an error when doing a for...of over
Sets. This is because IE needs a Set polyfill, which may be applied
after lib-jitsi-meet has loaded. However, lib-jitsi-meet on load
creates two Sets, one for CallStats.fabrics and another for
Statistics.instances. When the polyfill is then applied, the two
existing Sets do not get new methods. The fix is to lazily
initialize the Sets to allow for polyfills to be applied.
Will emit BEFORE_STATISTICS_DISPOSED event, before the last CallStats
fabric is terminated to make sure that the final logs batch is reported
correctly.
Also adds a check for CallStats instance to queue events when
the backend has been initialized, but there is no CallStats instance
available to report on.
* ref(CallStats): cleanup constructor
Changes CallStats constructor to not take the whole JingleSessionPC as
it only needs an alias and the TraceablePeerConnection instance.
Describes the arguments in JSDoc.
* ref(CallStats): rename var
Everything is callstats c'mon...
* ref(CallStats): remove _checkInitialize
The _checkInitialize was trying to workaround CallStats lib issue
without really checking for any specific type of error on whether or not
it makes sense to retry.
Also it depended on some internal fields of 'callStatsBackend' and was
binding 'initCallback' to the backend instead of CallStats instance
which made no sense (it means it's very likely this functionality was
broken anyway).
It would be hard to fix it in a clean way, because CallStats instance
fields would have to be stored in static variables in order to make
the initCallback work (called from '_checkInitialize').
We also need to have more than one CallStats instance running at the
same time, because of the P2P which makes things even more complex.
* fix(CallStats): do not catch 'sendApplicationLog'
Wrapping 'sendApplicationLog' in 'tryCatch' will result in an endless
loop, because it will be logged on the logger.error which then tries
to send the logs immediately again.
* ref(CallStats): do not use call on static
There's nothing more confusing that seeing 'this' in a static method.
Wow maybe these methods are not really static !?
* ref(stats): fix var name
* feat(stats): report P2P to CallStats
Will create new CallStats fabric for the P2P peerconnection in order to
log peer to peer connections.
Refactoring was required in the statistics and CallStats module to be
able to have more than one CallStats instance. Because each CallStats
fabric reports one peer connection now each CallStats will correspond to
one TraceablePeerConnection. CallStats instances are now stored in a Map
mapped by the TraceablePeerConnection.id field.
In order to be able to execute some global/static CallStats reporting
methods all Statistics instances also need to be stored in a static
field.
CallStats API backend(new callstats()) will be initialized only once for
the values provided in the first call to initializeBackend. It is not
possible to have more that one CallStats backend running at the same
time (at the time of this writing). If we would have a routine for
disposing global "Statistics" module we could try to cleanup static
reference and allow to initialize it with new values (but no such use
case yet).
* ref(CallStats): move initCallback
Since there is no alphabetic order preserved in this file anyway at
least place it closer to it's usage.
* ref(CallStats): remove tryCatch
Temporarily removes tryCatch to make the ES6 conversion easier.
* ref(CallStats): convert to ES6
* style(CallStats): fix indentation
* fix(statistics): use import for CallStats
* ref(CallStats): convert static methods
Some of the methods should not be static, because it only make sense
to call it when there is CallStats instance available.
* ref(CallStats): rename var
* doc(CallStats): remove misplaced comment
* chore(CallStats): remove invalid eslint comment
* fix(CallStats): undefined CallStats namespace
If no CallStats ID namespace option is provided the conference will be
reported without it.
* style(stats|CallStats): remove extra lines
* fix(CallStats): do not log error from tryCatch
GlobalOnErrorHandler calls logger.error anyway.
* fix(CallStats): cleanup tryCatch
If I understand correctly our initial intention with doing tryCatch was
to avoid crashing the whole app in case the CallStats backend would
crash. With this commit the tryCatch is done by wrapping original
backend instance methods or using explicit try catch block where
the method is called only from one place or a value needs to be returned
in case of a crash.
* ref(CallStats): make backend a static var
* fix(CallStats): invalid eslint comments
* ref(CallStats): use for..of
* ref(CallStats): fixes around REST args
* ref(CallStats): rename var
* ref(CallStats): reorder static methods
Also renamed some callbacks
* doc(CallStats): adds some docs
* ref(CallStats): make methods not static
Both 'sendDominantSpeakerEvent' and 'sendScreenSharingEvent' methods are
not really static as they require instance to be called.
* fix(CallStats): invalid key
* fix(CallStats): reduce amount of debug logs
* feat(p2p|CallStats): log hold/resume
Will put CallStats fabric for the JVB connection "on hold" while in p2p
mode.
* doc(CallStats): add FIXME
* doc(JitsiConference,CallStats): typos and renaming