API for WebRTC diagnostic logging. This API allows an application to opt in to diagnostic logging. These logs contain information about the WebRTC activity by the application and are useful for local debugging or to file bugs. Logs can be optionally uploaded out of band to the browser vendor and can be used for diagnosing bugs. The application gets an ID that can be attached to a bug report, similar to crashes. Diagnostic logs are enabled via an enterprise policy called WebRtcDiagnosticLogCollectionAllowedForOrigins.
WebRTC applications often encounter complex connectivity or media quality issues that are difficult to reproduce in local environments. To debug these issues in production, sometimes it is helpful for developers to have access to internal state and performance metrics. This also applies to issues in the user agent. The WebRTC Web Diagnostic Logging API allows authorized web applications to trigger the collection of diagnostic data in a log file so that it can be used for local debugging. It also allows an application to share the diagnostic data with the user agent, subject to user authorization, with the purpose of providing information that can help fix bugs in or improve the user agent.
Explainers: https://github.com/WICG/webrtc-diagnostic-logging/blob/main/explainer.md