About
Send the browser logs and JavaScript errors your New Relic browser agent already captures into Sazabi. The agent sends its data to the host in itsinit.proxy.beacon setting when one is set. Set it to your Sazabi beacon host and the agent sends its harvests to Sazabi. Sazabi answers the agent’s page-view call itself, so the agent keeps running without a New Relic account behind it.
Sazabi stores:
- Browser logs: every log the agent captures from
consolecalls and thenewrelic.logAPI, with its level, page URL, session ID, and page view ID. - JavaScript errors: every uncaught or reported error, with its message, error class, stack trace, page, and session ID.
Prerequisites
- New Relic browser agent 1.243.0 or later (the first version that accepts a host for
init.proxy.beacon), loaded with the copy-paste snippet or the@newrelic/browser-agentnpm package - Your Sazabi beacon host, shown above. Open the log source and copy the Beacon host from its setup screen. It is your intake URL without
https://
Set up in the dashboard
Sazabi authenticates with the public key in the beacon host, so it ignores the New Relic license key. Keep your existinglicenseKey and applicationID: the agent needs non-empty values to start.
Option A: Copy-paste snippet
Addproxy to the NREUM.init object in your snippet, next to its existing keys:
Browser agent snippet
Option B: npm package
Passproxy in the init option of BrowserAgent:
app.js
<your beacon host> with the beacon host shown above. Use the host only, without https:// or a path.
Hand off the change
Commit the change on a new branch, push it, and open a pull request. Then deploy it and reload a page that runs the agent.Set up with the CLI
You can also register the New Relic Browser log source with the Sazabi CLI (installed and authenticated — see CLI reference). Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):https:// and set the rest as init.proxy.beacon using one of the options above. Run sazabi log-sources get <log-source-id> at any time to reprint the endpoint, or sazabi log-sources list to see every log source in the project.
Verify
Load a page that runs the agent and runnewrelic.log("sazabi new relic browser test") in the browser console. Open the Intake page in the Sazabi dashboard and confirm a log from the New Relic Browser source appears within a minute, with session.id and url.full set.
Troubleshooting
No requests to the beacon host — Agents older than 1.243.0 don’t accept a host forinit.proxy.beacon, and the setting is ignored when proxy sits outside init. Run NREUM.init.proxy in the browser console to check it.
Errors arrive but logs don’t — The agent captures console calls made after it loads and calls to newrelic.log. Check the browser’s network tab for /browser/logs requests to the beacon host.
Data stopped appearing in New Relic — Expected: the beacon now points at Sazabi.
Further reading
Intake
See per-source ingestion volume and health.
Log sources
Browse the full log source catalog.