React
Instrumenting your React or Single Page Application (SPA) with the OpenTelemetry Web SDK allows you to capture user interactions, page load times, document fetches, and custom application metrics.
Installation
Section titled “Installation”Install the required OpenTelemetry packages for web:
Configuration
Section titled “Configuration”Initialize the OpenTelemetry provider in your application’s entry point (e.g., index.js or main.tsx) and configure it to send data to the KloudMate Agent’s OTLP endpoint:
(Replace KM_AGENT_HOST with the IP address or hostname of your KloudMate Agent).
Official Documentation
Section titled “Official Documentation”OpenTelemetry is continuously evolving. For the most up-to-date SDK instructions, advanced configurations, and custom instrumentation details, refer to the official OpenTelemetry documentation:
Looking for a step-by-step tutorial?
Check out our Instrument a React App guide to see how to manually instrument a React Single Page Application.