Enhance your application's observability and debugging capabilities by following these simple setup instructions.
Prerequisites
- A Pro or Pro + SPA browser agent
重要
Automatic log detection is not available for the Lite browser agent.
Enable automatic log collection (For Existing Browser Apps)
To enable automatic log collection for an existing browser app:
Go to one.newrelic.com > All Capabilities > Browser.
Select your browser app.
In the left-hand menu, click Application settings.
Ensure the Pro or Pro + SPA browser agent is selected.
Toggle Browser Logs to ON.
Toggle the required verbosity level to ON, you can choose from:
- Error
- Warn
- Info
- Debug
- Trace
Edit the sampling rate to specify the percentage of user sessions for which to collect logs. You can enter a value between 0 and 100.
重要
- Logs sampling is coordinated with other sampling decisions to maximize data collection for the same session. For example, if you set the logs sampling rate to 5% and your Session Replay (SR) sampling rate to 10%, then:
- Roughly 5% of your sessions will have both Logs and SR collected.
- Roughly 5% of your sessions will have only SR data collected.
- The remaining sessions will have neither.
- For any new browser apps you create, automatic log collection is enabled by default with a warn verbosity level and a sampling rate of 10%.

Disable browser logs
To disable browser logs for an existing browser app:
Go to one.newrelic.com > All Capabilities > Browser.
Select your browser app.
In the left-hand menu, click Application settings.
Toggle Browser Logs to OFF.