#React Real User Monitoring
Instrument your React applications with @baselime/react-rum
.
#Instrumentation
Check out a complete example using Next.js.
Step 1: Install @baselime/react-rum
in your project.
Step 2: Add the Baselime Real User Monitoring component at the top level of your application.
Once this is done, all Unhandled exceptions are sent to Baselime
#Web Vitals
Additionally, you can enable capturing web vitals from your React applications. Use the enableWebVitals
prop.
- Time To First Byte (TTFB)
- Largest Contentful Paint (LCP)
- First Input Delay (FID)
- Cumulative Layout Shift (CLS)
#Error Boundaries
To provide a better UX for end users, use React Error Boundaries.
The BaselimeErrorBoundary catches errors in any of its child components, reports the error to Baselime. It works in conjunction with the <BaselimeRum />
Component so that all errors are correlated by Page Load, and User Session.
#Error Boundary Options
You can use these options when creating an BaselimeErrorBoundary component, and choose which one best fits your needs based on how you want to handle errors and fallback UI rendering.
#Capture Exceptions
Error Boundaries do not catch errors inside event handlers. To catch Exceptions
#Custom Events
Capture custom events for analytics and monitoring. Like logs but with all the power of Baselime.
sendEvent(message: string, payload)
#Setting the active user
To set the User from another component then call
#Using your data
Once the data is captured, you can query, search and analyse your data in the Baselime console. You can create dashboards and alerts based on the Real User Monitoring metrics.