Getting Started
RPAlert SDK automatically collects real-user performance metrics (LCP, FCP, CLS, Long Tasks, etc.) and sends them to your RPAlert dashboard.
Installation
npm install rpalert-sdk
# or
pnpm add rpalert-sdk
Minimal Setup
Wrap your app with RPAlertProvider in your root layout (app/layout.tsx).
import { RPAlertProvider } from "rpalert-sdk/react";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<RPAlertProvider apiKey="YOUR_API_KEY">
{children}
</RPAlertProvider>
</body>
</html>
);
}
Get your API key: Create an app in the RPAlert dashboard to receive your API key.
Next Steps
- Integration — Step-by-step guide for Next.js App Router
- API Reference — Full list of props and functions