mirror of https://github.com/OpenVidu/openvidu.git
3.9 KiB
3.9 KiB
Tasks
1. Contract and typings
- 1.1 Add the optional
mediaStatsbool to thenodes,roomsandparticipantsschemas ofdashboard-ce/typings/contract/, the document types ofsrc/data-model/and the fixtures, then regenerateschema/andfixtures/. Verify with the typings contract tests and the typecheck. - 1.2 Add
mediaStats?: falsetoRoomListItemandmediaStats?: 'partial' | 'none'toAnalyticsSummaryinsrc/api/. Verify with the typecheck of every package.
2. Writer (openvidu-livekit)
- 2.1 Vendor the contract into
openvidu/analytics/schema/contract/withcontract/vendor.sh. Verify with the writer's contract tests and./dashboard.sh contract-check. - 2.2 Add
openviduconfig.MediaStats(default true) andanalytics.Node.MediaStats, set from it inopenvidu/openvidu.go, and writemediaStatson every heartbeat. Verify with a store integration test of the heartbeat for both values. - 2.3 Stamp
mediaStats: falseon rooms and participant sessions created by a node without media statistics, followingnodeId(ROOM_CREATEDsets or removes it; other events only whilenodeIdis unknown), and keep the legacy migration atMediaStats: true. Verify with projection unit tests and writer integration tests of the three scenarios of "Nodes without media statistics". - 2.4 Make signal and data pseudo-track stats advance the room's
lastStatsAtwithout bytes or quality. Verify with a projection unit test of the signal-only flush, the writer integration tests and the batch benchmark. - 2.5 Lint the fork with the Dockerfile Go toolchain and run its unit and integration tests. Verify that both pass.
3. Backend
- 3.1 Return
mediaStats: falseon rooms list items of stamped rooms. Verify with a mapper unit test and a rooms route integration test. - 3.2 Compute the summary's
mediaStatscoverage from thenodesdocuments whose span overlaps the range, for theglobalandnode:<id>scopes, and declare it in the OpenAPI document. Verify with unit tests of the fold, an integration test of the four "Media statistics coverage" scenarios with anexplain()assertion on thenodesquery, and the OpenAPI test.
4. Frontend
- 4.1 Render "—" with the tooltip in the Data up / down cell of stamped rooms in the Rooms table. Verify with a component test and an e2e test against the mocked API.
- 4.2 Apply the summary coverage to the Data up / down tile and the Bandwidth section (notice for
none, note forpartial), and expose it to the extension cards asAnalyticsPageContext.mediaStats. Verify with component tests, a test of the context signal and an e2e test of the three "Media statistics coverage notes" scenarios.
5. Data generator
- 5.1 Add
--nodes-without-media-stats <n>(default 0) to the data generator and keep the flag in the keep-alive, let a calling demo pass extra generator options (GENERATOR_ARGSofdemo-lib.sh), and update the README. Verify with a generator test that the marked node's rooms and sessions are stamped and have no mediatrack_stats, room bytes or quality, and that the other nodes reportmediaStats: true.
6. Docs and CHANGELOG
- 6.1 No CHANGELOG line: unreleased, and a CE server always reports media statistics. Update the
AGENTS.mdnotes that list the node heartbeat fields or the generator options, if any. Verify by reading the change against the CHANGELOG and theAGENTS.mdfiles.
7. Integration check
- 7.1 Run
./dashboard.sh checkand./dashboard.sh contract-check ../openvidu-livekit. Verify that both pass. - 7.2 Run the analytics writer suite of
openvidu-test-integrationagainst a local deployment with the new server image. Verify that the node document hasmediaStats: trueand that rooms of signal-only participants getlastStatsAt.