Add telemetry for getUserMedia/getDisplayMedia/enumerateDevices secure vs insecure vs legacy
Categories
(Core :: WebRTC: Audio/Video, enhancement, P2)
Tracking
()
People
(Reporter: jib, Assigned: ng)
References
Details
Attachments
(2 files, 1 obsolete file)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
3.41 KB,
text/plain
|
tdsmith
:
data-review+
|
Details |
Our WEBRTC_GET_USER_MEDIA_SECURE_ORIGIN telemetry has expired. We should not renew it, since it used outdated https distinctions (e.g. https-iframe in http != secure).
Instead I propose we add new ones based on isSecureContext():
- WEBRTC_GET_USER_MEDIA_SECURE_CONTEXT
- WEBRTC_ENUMERATE_DEVICES_SECURE_CONTEXT
..maybe with different buckets for in-focus vs. background tab for bug 1397978.
Also some tracking to determine legacy usage would be prudent:
- WEBRTC_GET_USER_MEDIA_MEDIA_SOURCE
- WEBRTC_GET_DISPLAY_MEDIA_CONSTRAINTS
| Assignee | ||
Comment 1•6 years ago
|
||
Jan-Ivar, could you elaborate on what you are thinking for WEBRTC_GET_USER_MEDIA_MEDIA_SOURCE, and WEBRTC_GET_DISPLAY_MEDIA_CONSTRAINTS?
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 2•6 years ago
|
||
Adding telemetry for gUM, enumerate devices, and mozRTCPeerConnection
| Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #0)
..maybe with different buckets for in-focus vs. background tab for bug 1397978.
See bug 1397978 comment 3 for context. We want to know whether the document HasFocus or not at the time of the request, for both getUserMedia() and enumerateDevices(), to count those impacted by that potential change to enumerateDevices(), as well as to count overall (ab)use of enumerateDevices() compared to valid uses in relation to getUserMedia().
In addition, I just realized it would be useful to know whether the request came from a cross-origin iframe or not as well, since we plan to turn on dom.security.featurePolicy.enabled in 68 it seems. I don't think we care about same-origin iframe, we can lump those in with non-iframe use. WDYT?
(In reply to Nico Grunbaum [:ng] from comment #1)
Jan-Ivar, could you elaborate on what you are thinking for WEBRTC_GET_USER_MEDIA_MEDIA_SOURCE, and WEBRTC_GET_DISPLAY_MEDIA_CONSTRAINTS?
The goal would be to detect usage of the legacy screen-share API we want to remove vs. adoption of its replacement.
The old (with choices):
navigator.mediaDevices.getUserMedia({video: {mediaSource: "screen"}});
navigator.mediaDevices.getUserMedia({video: {mediaSource: "window"}});
navigator.mediaDevices.getUserMedia({video: {mediaSource: "application"}});
We don't care about "browser" and "audio-capture" since these are behind pref. That said, from bug 1206900 it looks like WEBRTC_GET_USER_MEDIA_TYPE already covers this, so never mind!
The new:
navigator.mediaDevices.getDisplayMedia({video: constraintsOrTrue});
navigator.mediaDevices.getDisplayMedia({video: constraintsOrTrue, audio: constraintsOrTrue});
I think it would be useful to track pickup of the new replacement API to have something to compare against (combined numbers give total screen sharing requests).
Initially I thought we might as well split up the requests into buckets based on constraints used, but now I'm thinking that's not necessary and will only make counting harder, since there's no controlling for multiple constraints in the same request then.
It would however be useful to track requests for audio (which is entirely optional in getDisplayMedia) since Chrome has that.
| Assignee | ||
Comment 4•6 years ago
|
||
Jib, I am fine reordering the buckets as you suggested. I had to pick an order, and I went with 0 being the one we want to see go to 0. On second thought I think I would rather favor having bucket order be stable over time. Are some of those categories going to disappear, and thus should be MSB fields? For example, is there a point where this is all behind secure contexts and we don't want to even count those buckets?
| Reporter | ||
Comment 5•6 years ago
|
||
For example, is there a point where this is all behind secure contexts and we don't want to even count those buckets?
Yes, the plan sometime post-bug 1335740 is to make everything secure context only. Were you thinking of making "insecure context" be 0x4?
| Reporter | ||
Comment 6•6 years ago
|
||
Should we just call them WEBRTC_GET_USER_MEDIA, WEBRTC_ENUMERATE_DEVICES, and WEBRTC_GET_DISPLAY_MEDIA?
| Reporter | ||
Updated•6 years ago
|
| Assignee | ||
Comment 7•6 years ago
|
||
Jib, yeah I was thinking of making the security context the 3rd bit. Changing the names is good too.
Comment 8•6 years ago
|
||
A quick reminder that new and changed Data Collections like these require Data Collection Review before landing. (You might already have been planning this. If so, well done!)
| Assignee | ||
Comment 9•6 years ago
|
||
| Assignee | ||
Comment 10•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
| Assignee | ||
Comment 14•6 years ago
|
||
Tim, a couple of the counters needed to be renamed from '*Background' to '*Unfocused'. Do I need to submit a revised data collection review doc, or can the data-review+ stand?
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Updated•2 years ago
|
Description
•