Skip to content

Gather Diagnostic Data #33

@aluhrs13

Description

@aluhrs13

Use case name

Diagnostics

Submitter(s)

Andy Luhrs

Motivation

App developers need to understand the fundamentals (performance and reliability in this context) of their applications. Hybrid applications oftentimes add difficulty to this, as native platforms are tailored to give them insights on native fundamentals, but don't have visibility into the fundamentals of their web content. It's generally possible to use web standard APIs like Performance Timeline and Reporting API to get and understanding of web fundamentals then correlate those to other native data, but that could be lossy and/or difficult.

Stakeholders

App developers and end-users.

Analysis

WebView2 has a handful of useful APIs in this area:

  • Process Failed: Allows developers to listen for an event if any of the processes in the WebView crashes or hangs.
  • Add Script On Document Create: Allows developers to inject and run JavaScript at document creation, which can be used to setup performance or reporting observers that send data to the host application. (there's a handful of other WV2 APIs to run JS that could be used for this too)
  • Call DevTools Protocol: Allows developers to run arbitrary Chrome DevTools Protocol (CDP) commands and listen to CDP events. This lets them perform pretty much any activity that a browser's DevTools would do such as observing memory usage, starting performance tracing, or listening to console output.

Related W3C deliverables and/or work items

Performance Timeline and Reporting API are the most notable.

How is the issue solved in the Browser, and what’s more is needed?

When investigating issues locally, web developers have access to various developer tools and sites varying by browser. Data at-scale generally uses the JS APIs above.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions