Manually capturing browser logs with the New Relic browser agent
The New Relic browser agent provides a way to capture raw log data from web applications for more thorough debugging and analysis. The agent has two API methods, `log` and `wrapLogger`, which allow developers to manually capture browser logs emitted by their web applications. This feature is useful for spotting errors or inconsistencies that may not be visible through traditional error tracking, obtaining verbose log messages with finer granularity, gaining insight into user behaviors, and easily organizing and triaging logs. The process of installing and configuring the browser agent involves selecting a deployment method, choosing an existing app monitored in APM, or naming a new app and enabling it. The `log` API captures data as a single log event, while the `wrapLogger` API instruments methods to capture log events on every call, simplifying the process of capturing logs across entire application ecosystems. Captured browser logs can be viewed, sorted, and customized within the logging view to help break down issues and improve understanding of the application's impact on customer experience.
Company
New Relic
Date published
Aug. 13, 2024
Author(s)
Jordan Porter, Lead Software Engineer at New Relic
Word count
836
Language
English
Hacker News points
None found.