@opencensus/web-instrumentation-perf

OpenCensus Web instrumentation to generate spans for browser performance API data.

Usage no npm install needed!

<script type="module">
  import opencensusWebInstrumentationPerf from 'https://cdn.skypack.dev/@opencensus/web-instrumentation-perf';
</script>

README

OpenCensus Web instrumentation for web performance APIs

Gitter chat

For overview and usage info see the main OpenCensus Web readme.

This package generates OpenCensus Web trace model spans based on performance API data provided by the browser. Specifically, it generates spans for the initial page load of a site based on the Resource Timing, Navigation Timing, and Long Task browser APIs. It attempts to gracefully degrade for older browsers that do not support those timing APIs, but it has not been tested yet for browser compatibility.

The library is in alpha stage and the API is subject to change.

Usage

Currently the primary intended usage of OpenCensus Web is to collect spans from the resource timing waterfall of an initial page load and trace on-page user interactions with a series of features like automatic tracing for clicks and route transitions, custom spans, and browser Performance API data. See the OpenCensus Web readme for details.

In the future we would like to support collecting spans for XHRs and other operations made after the initial page load and then join those back to the Resrouce Timing API information for more detailed network timings and events.

Useful links

License

Apache 2.0 - See LICENSE for more information.