Real User Monitoring (RUM)
Capture client-side performance bottlenecks. Monitor Core Web Vitals at p75 (LCP, INP, CLS), network call latency, and frontend JavaScript exceptions directly from the browser. Drill into individual session timelines linking every page load, and upload your build's source maps to de-minify production stack traces back to original source.
Prerequisites
- Your frontend domain must be explicitly whitelisted in the Senzor dashboard to prevent CORS rejection.
1. Dashboard Configuration
Before injecting code into your application, you must provision an API key from the Senzor dashboard.
Navigate to Web APM
Click the '+' icon next to Web APM (RUM).
Define Allowed Domains
You must explicitly define comma-separated domains (e.g., 'senzor.dev, app.senzor.dev'). Telemetry from unauthorized origins is dropped.
Upload Source Maps (optional)
From your CI, POST each build's source maps to de-minify error stack traces. Authenticate with your RUM ingest API key; see the Source Maps card on the dashboard for the exact command.
2. SDK Installation
Select your environment below to view the initialization code.
<script src="https://cdn.jsdelivr.net/gh/senzops/web-agent/dist/index.global.js"></script>
<script>
window.Senzor.initRum({
apiKey: "<YOUR_RUM_KEY>",
sampleRate: 1.0,
allowedOrigins: ["https://api.yourbackend.com"]
});
</script>Configuring allowedOrigins injects W3C Trace Context headers into outgoing fetch/XHR requests, bridging frontend RUM with backend APM traces.
Troubleshooting & Edge Cases
Metrics are rejected (403 Forbidden).
This occurs if the website's hostname does not exactly match the 'Allowed Domains' configured in the dashboard.