@open-infra/telemetry-browser-react
v0.2.0
Published
React provider, hook, and error boundary for OpenInfra browser telemetry.
Maintainers
Readme
@open-infra/telemetry-browser-react
React bindings for the shared browser runtime.
Install
npm install @open-infra/telemetry-browser-react reactES 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
BrowserTelemetryProvider accepts runtime or config and starts it in an effect. useBrowserTelemetry retrieves it; check runtime.state before accessing logger/tracer. TelemetryErrorBoundary records React errors while running. Keep config stable across renders. shutdownOnUnmount defaults to false because global providers are page-lifetime.
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.
