opentelemetry-js/doc/web-api.md

951 B

Web API Usages Guidance

The packages of OpenTelemetry that targeting web platforms should be compatible with the following web environments:

As such, the usage of Web API that depends on APIs like window, document and [navigator] is discouraged.

If the use of the browsing context API is necessary, like adding onload listeners, an alternative code path for Web Worker environment should also be supported.

It is an exception to above guidance if the package is instrumenting the browsing context only.