Use NewRelic to monitor applications and infrastructure

Tram Ho

Use NewRelic to monitor applications and infrastructure

  1. Install newrelic in ROR
  2. Check page performance
  3. Track browser
  4. Conclusion

1. Install newrelic in ROR

  • To use newrelic you can visit https://newrelic.com/ to sign up for an account
  • Next go to your profile -> Add your data -> Ruby
  • Newrelic uses the authorized key for the account then creates a configuration file which we then put in the config directory to collect statistics data.
  • The next step is to add the settings so that newrelic gets the data
    • The first is to name your project for ease of management if you have a lot of projects, naming and renaming effects can be found here.
    • Next you need to install the newrelic gem and run bundle install
    • Download the configuration file that newrelic created then place it in the config / directory.
    • Restart your application to send data to newrelic
    • Press the button to test your data and see the results

2. Check page performance

  • To check the performance of your page in the browser -> select your appcuar -> Page views
  • Here newrelic provides an overview of your website’s performance
  • You can optionally arrange to see details by percentage of page load, average load time or throughput including detailed time, browser traces or existing sessions.
  • Summary on the left hand side of the screen
    • Lists views as URLs, which makes it easy to determine a user’s page view based on the url.
    • To see details you can move to the position on the chart including the minimum, maximum request time, total processing time, …
    • Black: Timeout between web server and application code. If it is in bulk shows a busy application server.
    • Purple: Time for application code
    • Brown: Network delay or response timeout
    • Yellow: HTML parse measured with the browser DOMContent event
    • Blue: Time to render HTML, run JavaScript, and load the images. Measured by browser load event.

3. Track browser

  • In this tab newrelic allows you to monitor end-user browsers including Google Chrome, Mozilla Firefox, Microsoft Internet Explorer, and Apple Safari.
  • It describes average load times across browsers and devices
  • Some of the actions on this page:
    • To see summary information about the browser at a specific time, you need to hover over any area on the chart
    • To hide data on the chart, you need to select a color with the corresponding title on the chart legend
    • To view details of a particular browser, select the name in the listed list or its position on the chart.

4. Details of specific browsers

  • Specifics include analysis by version and average page load times.
  • The colors shown in the chart are similar to the page views
    • Black: Timeout between web server and application code. If it is in bulk shows a busy application server.
    • Purple: Time for application code
    • Brown: Network delay or response timeout
    • Yellow: HTML parse measured with the browser DOMContent event
    • Blue: Time to render HTML, run JavaScript, and load the images. Measured by browser load event.

5. Conclusion

Here are some of the features in the newrelic I learned, you can learn and refer to how to use it here.

Share the news now

Source : Viblo