@open-infra/telemetry-browser-testing
v0.2.0
Published
In-memory exporters and test runtime for OpenInfra browser telemetry.
Downloads
316
Maintainers
Readme
@open-infra/telemetry-browser-testing
In-memory browser telemetry test fixtures.
Install
npm install @open-infra/telemetry-browser-testingES modules with TypeScript declarations. Node.js 20.11 or newer; browser bindings require a browser bundler. Use synchronized versions of the OpenInfra telemetry packages.
Usage
createBrowserTestTelemetry returns { runtime, spans, logs, metrics }. In a browser or DOM test environment, await runtime.start(), emit records, await runtime.forceFlush(), inspect the exporters, then await runtime.shutdown(). Global registration, offline storage, and automatic instrumentation are disabled by default.
Lifecycle and limits
Application runtimes own startup, consent, batching, and shutdown. Queues are bounded and can drop records under pressure. Framework adapters enrich existing spans rather than creating a second request span or provider. Keep browser gateway credentials on the server.
Getting started · Operations · Delivery semantics
Apache-2.0.
