Sending a sample of events to Speed Insights

Learn how to send a sample of your data to Speed insights.

DX Team
1 min read
Last updated November 11, 2025

By default, all events are sent to Speed Insights.

To send only a sample of your data, you can add the Speed Insights component with the sampleRate prop to your app's root layout. The sampleRate prop accepts a number between 0 and 1, where 0 is 0% and 1 is 100%:

app/layout.tsx
import { SpeedInsights } from '@vercel/speed-insights/next';
export default function RootLayout({ children, }: {children: React.ReactNode;}) {
return (
<html lang="en">
<head>
<title>Next.js</title>
</head>
<body>
{children}
<SpeedInsights sampleRate={0.5} />
</body>
</html>
);
}

Was this helpful?

supported.

Read related documentation

Explore more Speed Insights guides

No related guides available.