Skip to main content
All New Relic integration capabilities

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 its init.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.
Setting init.proxy.beacon sends the agent’s data to Sazabi instead of New Relic, not in addition to it.
Sazabi stores:
  • Browser logs: every log the agent captures from console calls and the newrelic.log API, 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.
Page views, page timings, AJAX timings, page actions, session replay, and session traces aren’t stored. Sazabi turns off session replay, session traces, and page actions in the agent.

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-agent npm 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 existing licenseKey and applicationID: the agent needs non-empty values to start.

Option A: Copy-paste snippet

Add proxy to the NREUM.init object in your snippet, next to its existing keys:
Browser agent snippet

Option B: npm package

Pass proxy in the init option of BrowserAgent:
app.js
Replace <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):
The command prints the intake URL for the new source. Drop 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 run newrelic.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 for init.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.