Re: [webrtc-pc] Remove "MAY generate statistics that are not documented." (#2844)

I'm **very** surprised the spec says "MAY generate statistics that are not documented", this is something I have fought valiantly against for years and seems to describe the legacy callback-based getStats() which I'm [deprecating](https://groups.google.com/a/chromium.org/g/blink-dev/c/PxQQtEM7za0) (grrrr!).
Yes, please remove this sentence.

TL;DR: Generally speaking, undocumented metrics is not a thing anymore. But there are a couple of exceptions if you keep reading:

Thanks to recent [WebIDL-ification of the RTCStatsReport](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.idl) we have an IDL overview of the stats and it appears that there are only find a handful of references to metrics that are not documented in webrtc-stats and these appear to exist in webrtc-provisional-stats, so they're still documented (with one exception):
- contentType, because it references a header extension that I don't know is WG sanctioned.
- rtcpTransportStatsId, I think this was removed as not applicable, but we did implement something. Question is how you trigger an RTCP transport case, is it ever not defined? Not sure but I think RTCP transport is not really something we want so this was moved from webrtc-stats to webrtc-provisional-stats.
- googTimingFrameInfo: This is the exception. You'll have to forgive me on this one, it's [not in the spec](https://github.com/w3c/webrtc-provisional-stats/issues/40), but it was in the legacy callback-based getStats() and was the only thing blocking migration, so I exposed it in the modern API as an unblocker. I don't like this metric at all.

There are also a couple of metrics that have been renamed or removed but the implementation still exposes them for backwards-compat. I think they fall into the category of "should be deprecated and removed", but for the time being they're technically undocumented. This includes:
- mediaType, which was renamed kind (Chromium exposes both names of this metric).
- ip, which was renamed address (both still exposed).
- isRemote, which was removed from the spec because the type (local-candidate or remote-candidate) already exposes the same information.
- writable, priority... I don't remember what these are.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2844#issuecomment-1479061859 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 March 2023 07:58:16 UTC