Try our new research platform with insights from 80,000+ expert users
it_user67695 - PeerSpot reviewer
Engineer at a tech services company with 51-200 employees
Consultant
Use New Relic like a Pro

Introduction

New Relic has become an industry standard for web applications performance measurement in Rails community. Simply adding and configuring newrelic_rpm gem for your Rails application gives you a great overview of its performance with an adequate level of details.
There are still a few improvements you can do to make use of some cool and extremely useful features of New Relic monitoring. They will help you to save time and efforts when fixing performance issues, scaling application, refactoring, etc.
So what should you do to make fast and effective use of New Relic?

Record your deploys

Always record deploys with your capistrano or chief scripts. This will save you time when looking for reasons for performance improvements or drawbacks.
A detailed information about recording deploys using capistrano can be found in official documentation. You can also use simple API deployment notification described here.
Either way it is important to add a clear description of deploy along with a tag or branch name.

Note that Pro users can also see ‘Change report’ for each deploy with a detailed overview of performance metrics changes (response time, throughput, apdex etc.).

Setup additional metrics before you start

It is important to setup some additional custom metrics right after configuring and enabling New Relic before you have experienced performance issues. You can read more about custom metrics collection here.
While you can add traces to almost any method in your code, they are commonly used for tracking important/critical parts of your code. We strongly recommend you to add traces for:

  • application critical parts of code;
  • external services communication (redis, RPCs, external APIs, DNS resolve etc.);
  • encoding/decoding methods (some json encode methods implementations can be slow for large objects).

These traces are useful even within internal network. Drawbacks may be caused by network lags or hosting provider problems.

Here are some useful examples of custom traces that you can easily add to your initialisation pipeline (e.g. application.rb).

Resque

Resque.add_method_tracer :enqueue

Resolv::DNS

Resolv::DNS.add_method_tracer :open Resolv::DNS.class_eval {add_method_tracer :getresources}

Redis

Redis.class_eval {add_method_tracer :set} Redis.class_eval {add_method_tracer :get} Redis.class_eval {add_method_tracer :sadd} Redis.class_eval {add_method_tracer :lpop} Redis.class_eval {add_method_tracer :rpush} Redis::Connection.class_eval {add_method_tracer :read} Redis::Connection.class_eval {add_method_tracer :write} Redis::Connection.class_eval {add_method_tracer :connect}

Setting up additional metrics have two main goals:

  • measuring performance of specific parts of code;
  • when investigating slow requests with a lot of ‘Application code’ segments these additional traces can be used as benchmarks.

Additional metrics will give you more detailed view of what and when is going on in your application.

Note: New Relic gem implementation already has traces for Net::HTTP methods.
Caution: Don’t be zealous on adding custom metrics, clean obsolete ones.
Collecting too many metrics can impact the performance of your application. It is strongly recommended to keep the total number of custom metrics under 2000.

Setup Server Monitoring

To look beyond application itself New Relic has introduced Server Monitoring tool.
It is critically important to setup Server Monitoring for all servers in production and even staging hosting scheme. It will help you to measure your environment performance and state.

Note. New Relic is including Server Monitoring for free for every subscription level.
You can find all required information about installation and configuration of Server Monitoring tool here.

Setup custom views and dashboards

In most cases application performance strongly depends on application state and users activity. It is also helpful to see how your application performance correlates with business metrics, database activity, internal services state etc. New Relic gives you an opportunity to setup custom metrics, group and organise them with views and dashboards.
Common useful custom metrics you should define for your applications are:

  • number of active users;
  • users activity metrics;
  • number of active application’s core entities (e.g. active tables for poker application);
  • number of connections/calls for internal/external services (some have specific thresholds);
  • database additional metrics.

Official documentation will help you to find more about creating and managing custom views and custom dashboards.

You can collect any custom metric and setup a specific custom view/dashboard in order to have general view on how they correlate.
Along with monitoring, custom dashboards and views also:

  • helps you to understand the reason of performance changes;
  • gives you a vision of future load changes depending on custom metrics;
  • provides an ability to predict critical thresholds for load values (e.g. active users);
  • helps you to improve application architecture by showing bottlenecks of internal infrastructure.

Note: The Custom Dashboards feature is available with New Relic Pro and higher.
It is useful to track only those custom metrics that have impact on overall application performance.

Setup background jobs/tasks monitoring

Always trace your background jobs performance. While in most cases they doesn’t directly impact on server response time they still can impact on user’s feedback and overall application performance.

Currently the Ruby agent supports only Delayed::Job and Resque.
Read more about monitoring Ruby background processes and daemons here. Make sure you have enabled and configured everything correctly.

Within one of our products we have employed an actor based architecture where actual action is executing asynchronously in a separate thread (we use JRuby). In such complex cases, it is useful to add traces for these actions and mark them as real web transactions (controller actions).

To complete such tasks or customise your add_method_tracer options please check API documentation.
For more detailed information about available options please read perform_action_with_newrelic_trace API documentation here. The most important options of tracer methods are:

  • :category — defines action type (available options: [:controller, :task, :rack, :uri]);
  • :name — action name (will be used as last part of metric name);
  • :params — call context parameters;
  • :class_name — first part of metric name. Default is a current class.

Here is a small example of custom background task implementation using JRuby thread actors.
ApplicationController:

def enqueue_task(opts={}) job_params = { class_name: "Scheduler::#{self.class.name}", name: params[:action], params: params } Scheduler.enqueue(job_params) {yield} end

Scheduler::WorkerActor:

//job_params are stored in job.params after enqueue def process_job(job) perform_action_with_newrelic_trace(job.params) do run_job(job) end end

So in this case all enqueued tasks and controller actions appear in ‘Web transactions’ together.

Summary

New Relic is a solid monitoring solution, especially for Rails developers.
Make sure you have enabled and configured all basic features described in this article.
And moreover — always learn your tools.

Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
Cloud Solution Architect at FCamara
Real User
Stable with a good VPN and very easy to set up
Pros and Cons
  • "The VPN is one of the solution's most valuable features for us."
  • "The older view is much better than the new view that they have. We'd like to go back to that previous version. The user interface just isn't as nice as it used to be."

What is our primary use case?

We primarily use the solution for watching user behavior, among other use cases.

What is most valuable?

The VPN is one of the solution's most valuable features for us.

We like that we have the ability to view users and speculate.

The initial setup is very easy.

What needs improvement?

The older view is much better than the new view that they have. We'd like to go back to that previous version. The user interface just isn't as nice as it used to be.

The solution does not seem to be lacking any features. I can't say that I recommend any specific features for the next release.

For how long have I used the solution?

I've been using the solution for about 2 months, more or less. It hasn't been too long just yet.

What do I think about the stability of the solution?

The stability of the solution has been good for us so far. We don't have any problems with it. It's reliable. It doesn't crash or freeze. There aren't bugs or glitches. 

What do I think about the scalability of the solution?

We've found the scaling to be good. If a company needs to expand it, it should be able to do so without any problems.

Currently, we have four or five people using the solution. Our company, however, works for my customers, and therefore we have a lot of ongoing projects.

How are customer service and technical support?

Technical support has been good so far. That said, we haven't really had any technical issues either. We're satisfied with the level of service we've received so far.

How was the initial setup?

We didn't find the initial setup complex. The implementation was straightforward and simple.

The deployment was pretty quick as well. It might have taken us one to two hours to get everything done.

What other advice do I have?

We're just customers. We're end-users. We don't have a business relationship with the company.

I would recommend the solution to other organizations. We've had a good experience with it so far.

On a scale from one to ten, I would rate the solution at a ten. It's pretty much perfect for our purposes.

Which deployment model are you using for this solution?

Hybrid Cloud

If public cloud, private cloud, or hybrid cloud, which cloud provider do you use?

Microsoft Azure
Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
Buyer's Guide
New Relic
December 2024
Learn what your peers think about New Relic. Get advice and tips from experienced pros sharing their opinions. Updated: December 2024.
824,067 professionals have used our research since 2012.
PeerSpot user
Dëvóps Engineer at a tech company with 51-200 employees
Real User
Leaderboard
Wonderful product

APM products are something that needs to be well-tailored to your specific needs and environment. for the project i'm currently working on, we chose new relic after a bakeoff with another vendor. both products were great, but new relic came up on top and we've been very happy with the insights it provides.

This review assumes one is familiar with APM and will not cover the basic benefits of New Relic as an APM product.

Strong points:

New Relic was very easy to deploy and had minimal impact on our environments. Visibility was near-total out of the box and support was extremely helpful in adding the missing instrumentation into the product.

New Relic supports a good mix of environments which is important to us as we work with several languages.

Support for background tasks is also an important feature for us which is usually not as well-covered in other products.

Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
it_user344805 - PeerSpot reviewer
Lead Software Architrect at a retailer with 51-200 employees
Vendor
It gives us a good digest of how the system is behaving and being able to diagnose any issues, though I'd like more granularity in the charts.

Valuable Features

Stack traces are the most valuable feature for us. We have a monolithic stack and just having a single place to get product track traces is incredibly valuable. We use all the charts and graphs, but it all comes down to getting stack traces to see how code is flowing.

Improvements to My Organization

We’re able to address events immediately. We have very good uptime and customer retention. So it’s all about giving them the best customer experience. It gives us a good digest of how the system is behaving and being able to diagnose any issues.

Room for Improvement

I’m into very dense charts, and I think the charts used throughout APM are a little low resolution in terms of time points across the X axis. I'd like more granularity.

Stability Issues

Used to be fairly slow, but it’s gotten a lot faster. It's industry-leading, the most responsive full suite of tools that I’ve used.

Scalability Issues

We’ve been able to brainlessly scale.

Customer Service and Technical Support

We've never had to use it.

Implementation Team

We set it up through Heroku.

Other Advice

Install it. Doesn’t take up any extra resources or any time to install.

Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
it_user344805 - PeerSpot reviewer
Lead Software Architrect at a retailer with 51-200 employees
Vendor
We’re able to deploy very quickly, not concerning ourselves with every single issue, but it’s a little sluggish going around getting down to the last dirty details of a session.

Valuable Features

We’re able to see real-time sessions come through. We talk directly to customers as they’re having issues with the site, and we can pull up their email addresses and see what issues they have. For customer support and engineering, it’s crucial.

Improvements to My Organization

We’re able to deploy very quickly, not concerning ourselves with every single issue. In production we can address every issue.

Room for Improvement

There may be issues with scalability with individual users sending events up to the cloud.

Also, it’s a little sluggish getting down to the last dirty details of a session. It’s tough to do, admittedly, but that’s what I’d wish for.

Stability Issues

It’s very, very reliable, no issues, and most importantly we haven’t lost any data and we’ve been able to hotlink particular events. All our documentation about particular events, we can always go back and see, which is good for training.

Scalability Issues

There have been issues, but I do wonder whether we’ll have to tailor the user experience and whether we’ll reach bottlenecks with individual clients sending events up to the cloud.

Customer Service and Technical Support

I've never had to use technical support.

Initial Setup

Very straightforward. I don’t recall how it went, that’s how easy it was.

Other Advice

Just install it. It provides so much more than alerting of errors.

Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
it_user342075 - PeerSpot reviewer
Software Engineer at a pharma/biotech company with 51-200 employees
Vendor
It saves time and engineering resources in terms of making things faster and diagnoses problems. Once in a while the data is delayed on the graph, but that only happens every month or two.

Valuable Features:

The main APM page with the graphs. We leave that up on our wall and we can tell pretty quickly if something is about to go wrong, or if the response time slows down. Database queries are really helpful as they helps to figure out where the low hanging fruit is in terms of making the site faster on the database site. 

I use key transactions a lot when I’m tweaking the resources for the site. There are certain transactions that I care about more than the rest. 

I use the throughput numbers a lot, especially working on workers as opposed to web. If I’m going to add more workers, first I want to know if there will be a bottleneck somewhere.

Improvements to My Organization:

It saves time and engineering resources in terms of making things faster and diagnoses problems. For us, engineering uses it but no one else even knows what it is. Overall, it improves the experience of the customers and site users.

Stability Issues:

It’s pretty solid. Sometimes they have downtime – for the most part the New Relic site is up all the time, but once in a while the data is delayed on the graph (like every month or two), but other than that it works!

Scalability Issues:

It’s scalable – thumbs up. We turn on new servers and New Relic just works.

Initial Setup:

It was already in production when I joined.

Other Advice:

All the information is there, but sometimes it’s hard to figure out what it means. You have to have used it a number of times in order to understand where to look. It doesn’t tell you the whole story, it just gives you pieces.

Disclosure: My company has a business relationship with this vendor other than being a customer: I used to work for New Relic.
PeerSpot user
it_user300519 - PeerSpot reviewer
Head of Content and Backend developer at a pharma/biotech company with 51-200 employees
Vendor
We're able to identify incorrectly optimized SQL queries, external machine bottlenecks, and other low performance issues.

Valuable Features

It helps us profile specific web server endpoints and identify what can be improved.

Improvements to My Organization

On a regular basis, we're able to identify incorrectly optimized SQL queries, external machine bottlenecks (i.e. higher throughput than can be handled), and other low performance issues.

Room for Improvement

I hope the next release has the ability to retain historical data.

A current limitation is comparing a present call with that of the same time the previous day, or previous week. It would be great to identify exactly which hours and days had lower performance than usual.

Use of Solution

I've used it since November 2013.

Deployment Issues

It's trivial.

Scalability Issues

It's trivial.

Customer Service and Technical Support

Support is quite good, around 8/10.

There is a lot of available resources online, and support leads you to their forums initially. Response times are within 24 hours if contacted by email.

Initial Setup

The initial setup was very straightforward.

The documentation is very complete and the procedure itself takes about five minutes, plus deployment time.

Implementation Team

New Relic is a software as a service so there is no implementation per se, just a setup.

Pricing, Setup Cost and Licensing

Pricing is great!

There are many free plans, and the for pay ones add a few important features such as longer log backup.

Other Solutions Considered

I chose this product for its ease of integration with our software stack, and its very attractive price plan.

Other Advice

New Relic is a great SaaS which I will definitely continue using and will use in future products.

We're a very happy customer.

Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
it_user289662 - PeerSpot reviewer
Senior Software Engineer at a media company with 1,001-5,000 employees
Vendor
We're able to determine where time is spent overall in server requests and to analyze database query times.

What is most valuable?

  • It provides information on where time is spent overall in server requests.
  • It performs database query time analysis.

What needs improvement?

New Relic APM generates weekly performance reports, but they aren't really actionable.

What was my experience with deployment of the solution?

No, but it was deployed before I arrived at the organization.

What do I think about the stability of the solution?

No, the service appears very stable. We get occasional 503 errors when pushing data to New Relic, but it's fairly infrequent.

What do I think about the scalability of the solution?

No issues encountered.

How are customer service and technical support?

Customer Service:

We haven't had to interact with customer service at all.

Technical Support:

I haven't had to use technical support.

Which solution did I use previously and why did I switch?

We've always used New Relic.

What about the implementation team?

It was done in-house.

What was our ROI?

We never quantified this.

What other advice do I have?

New Relic was the market leader at the time. It still is, although there are more competitors now (AppNeta, sysdig).

Disclosure: I am a real user, and this review is based on my own experience and opinions.
PeerSpot user
Buyer's Guide
Download our free New Relic Report and get advice and tips from experienced pros sharing their opinions.
Updated: December 2024
Buyer's Guide
Download our free New Relic Report and get advice and tips from experienced pros sharing their opinions.