ObserveRTC / client-monitor-js

Javascript library to monitor browser-side webrtc app
https://observertc.org/docs/api/client-monitor-js-v2/
Apache License 2.0
31 stars 3 forks source link

Add old-stats metrics #2

Closed misi closed 1 year ago

misi commented 2 years ago

Add old stat metrics with all goog prefixed metrics

balazskreith commented 1 year ago

The schema for clientSample should be based on the actual draft I think. If any browser-specific implementation or metric is relevant or useful we can report it as extensionStats for example like this:

monitor.events.onStatsCollected(rawStatsArray => {
  // rawStatsArray is an array of stats polled from peer connections, thus they should contain the metrics you are looking for
  const browserSpecificMetrics = {} // make a magic to select the metrics you want to report

  // send it as extension stats
  monitor.addExtensionStats({
    name: "BROWSER_SPECIFIC_METRICS",
    payload: JSON.stringify(browserSpecificMetrics)
  });

In that way you will end up having them as extension stats in your database.

balazskreith commented 1 year ago

as mentioned above any kind of browser specific stats can be added as extension-stats. As client-monitor no longer responsible for transport, the application do the signalling to the stats-collecting server can accept browser-spcecific stats too.