atatusRum.init(). licenseKey and appName are required. Everything else has a default, so start small and add options as you need them.
For log-specific options, see Logs.
Identity and transport
These options label your data and control where it is sent:Choose your region
Your license key belongs to one Atatus region, so setsite to match it. The default is us:
site is set. There is nothing else to configure.
Pass the same site to atatusLogs.init() so logs and RUM reach the same region.
An unrecognized
site logs an error in the console and falls back to us, so the agent keeps running rather than dropping your data. Check the console if your data is not appearing in the region you expect.Send to a self-hosted collector
serverUrl points the agent at your own intake, for example https://collector.example.com. It accepts a full URL or a bare host, and it applies to every signal: RUM, logs, and session replay all go there instead of the regional hosts.
serverUrl wins over site, so set one or the other. If both are set, site is ignored.
Sampling
Sampling controls how much data you collect. All rates are percentages from 0 to 100:sessionReplaySampleRate applies to sessions that sessionSampleRate already kept, so the two multiply. Setting the session rate to 50 and the replay rate to 30 records replay for 15% of all sessions, not 30%.What gets tracked
Views, errors, and web vitals are collected automatically. Turn on the rest as you need them:Sessions, consent, and delivery
These options control how sessions are stored and when data is allowed to leave the browser:Ask for consent before collecting
If you need consent before collecting anything, start withnot-granted and switch once the user agrees:
not-granted, and nothing is buffered for later.
Tracing
Tracing attaches headers to the requests your application makes, so a click in RUM links to the backend trace it caused. Your backend must be instrumented with Application Monitoring:Change events before they are sent
beforeSend runs on every event just before it leaves the browser. Use it to redact data or to drop an event entirely by returning false:
Next steps
- Session Replay: recording and privacy options.
- Framework Integrations: name views by route.
- API Reference: methods you can call after
init().