Commit Graph

14 Commits

Author SHA1 Message Date
prlanzarin
3c4e3de286 feat: add WebRTC stats information to client logs
We should be able to capture  WebRTC stats in some form for post-processing
so that it helps on debugging support requests (and other use cases, e.g.:
improving field trial analysis on test servers).
Although much of WebRTC stats information can be gathered via server side
components, none have logs as structured for proper post-processing as
the client logs - so we're going the client route for now.

Capture WebRTC stats information for audio and screen sharing via:
  - Audio logCodes: new `stats` extraInfo field
    - `audio_joined`
    - `audio_failure`
    - `sfuaudio_error_retry_through_relay`
    - `sfuaudio_error_try_to_reconnect`
  - Screen share logCodes: new `stats` extraInfo field
    - screenshare_presenter_start_success
    - screenshare_viewer_start_success
    - screenshare_broker_failure

Additionally, add an option to periodically capture WebRTC stats information
for all relevant peers. This is disabled by default since the log can be
verbose (and, consequentially, network taxing when using external
logging targets). It can be enabled via `public.stats.logMediaStats` in
settings.yml. The default interval is 30s. The periodic log format is as
follows:
  - logCode: `mediaStats`
  - extraInfo.stats: an aggregated stats object of all peers (equivalent
    to the `Copy` function in the Connection Status modal).
2024-08-27 14:00:26 -03:00
Pedro Beschorner Marin
068b82b1fa refactor(connection status): remove legacy monitor
Remove parts of a previous connection monitor.

To add some context (as far as my memory goes) to the multiple connection
monitor features the product has, `stats` (currently named `connection status`)
was introduced at the Flash client back in ~2016. @fcecagno and I did it
as a BigBlueButton's Summit activity. Our work was squashed into a single
commit in 92554f8b3e :).

I'm not sure about the whole story behind `network information` (the late
connection monitor added to the HTML5 client) but I assume it should work
as a collector for a bunch of different connectivity monitors. I remember
when it was introduced but I don't know why it wasn't adopted. My best guess
would be because of some performance issues the `user list` had back then.

To follow on why `connection status` replaced `network information` at the
HTML5 client, when I did the `multiple webcams` feature I had to refactor
a big chunk of the `video provider` (#8374). Something that wasn't really
helping there was the adaptation of `stats` that was made to show local
feedback for each webcam connection. Although this feature wasn't being
used anymore, `network information` did rely on that to build up data. With
this monitor gone I assumed it was my responsibility to provide an alternative
so I promoted Mconf's port of the Flash `stats` monitor to BigBlueButton's
HTML5 client (#8579).

Well, that's my perspective on how things went for those features. If
anyone would like to correct me on something or add something else on
that history I would appreciate to know.
2021-06-13 14:02:46 -03:00
Pedro Beschorner Marin
2e2a978018 refactor(connection status): remove superfluous trailing argument 2021-05-09 14:26:14 -03:00
Pedro Beschorner Marin
83c813ac6f refactor(connection status): interval and log configuration
Simplify how connection status inteval is configured and make server
log the solo logging option.
2021-04-23 19:15:32 -03:00
Pedro Beschorner Marin
280b32d21d Move connection-status to nav-bar
- Removed the connection-status history from the user list's gear
icon and now is opened by the connection-status button. Moderators will
render the same modal as before and viewers will only have access to their
own data.

 - Added data-savings shortcut at the connection-status modal.

 - Added websocket round-trip time.
2021-03-26 10:12:09 -03:00
Pedro Beschorner Marin
9cb7c2bb2f Avoid stopping the stats monitor before connection closed 2020-05-14 10:40:31 -03:00
Pedro Beschorner Marin
ffb07415cb Fixed stats notification timeout 2020-05-14 10:36:19 -03:00
Pedro Beschorner Marin
2ac3c2e804 Check if peer connection isn't closed 2020-02-14 18:17:18 -03:00
Pedro Beschorner Marin
11cfea2359 Logging audio stats 2020-01-29 14:54:35 -03:00
Pedro Beschorner Marin
1103663d86 Monitoring audio WebRTC stats 2020-01-28 10:07:21 -03:00
Pedro Beschorner Marin
bc463cc8f2 Fixed jitter gathering in stats 2019-12-20 17:21:00 -03:00
Pedro Beschorner Marin
0bb4d50522
Included missing constant declaration 2019-12-19 11:36:50 -03:00
Pedro Beschorner Marin
8f8463cf91 Log when stats monitor stop 2019-12-10 09:07:07 -03:00
Pedro Beschorner Marin
5c71e2d0bb Included new getStats monitor for audio and video 2019-12-10 09:07:06 -03:00