new relic for WebApp

Sahil Pandya
2 min readDec 10, 2022

--

Why new relic for Web-App:

  • It is the best tool for monitoring the performance of web applications and servers.
  • It helps to track web metrics like LCP, initial page load, FCP, etc.
  • NewRelic helps to track all your error handling if anything client-side or server-side error will come, we can add monitoring on specific services to track the errors and it helps to improve quality.

new relic Setup:

  • Please follow the below document, and do the new relic signup.
  • After Login, Go to one.newrelic.com, Go to the browser section in the Dashboard
  • Click on the top right side Add Data button.
  • It will screen like the below:
  • Select respective your browser language, Like I have selected React for Web App.
  • After that it will open below the screen,
  • Where you will get the Script which you need to inject in your Code.
  • Follow the Above screenshot steps, add your App name like if you want to configure Newrelic for Dev or prod Environment then add your name accordingly like AppName-prod or AppName-UAT.
  • Once you submit it will create one row with the your App Name.
  • Now lets inject Javascript code in your App

- Add you Javascript code in the particular one file like NewRelic.js or fileName.js.

- Add new relic Script file in your codebase folder.

- Import Above file in the HTML header or import in the your entry.js file.

- Like App.js -> `import ‘folderPath/newRelic.js’`

  • Once you added new relic in your code, Restart your Web App.
  • To check is new relic working or not, you will be able to see newRelic code injected in inspect element or Check after sometime in the new relic browser dashboard, where you will be able to see metrics regarding web.

So following above steps it will integrate newrelic for your web app.

To use all the features of newrelic we need to do couple of the things like error tracking or monitoring metrics etc.

For more details, here is a reference document: https://docs.newrelic.com/docs/browser/browser-monitoring/getting-started/introduction-browser-monitoring/

--

--

Sahil Pandya
Sahil Pandya

Written by Sahil Pandya

Learning, Exploring, Implementing and then Writing things after experience.

No responses yet