Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
  1. Code
  2. New Relic

Introduction to New Relic Insights

This post is part of a series called Performance Monitoring With New Relic.
Using New Relic to Monitor Your Servers
Introduction to New Relic Synthetics
Sponsored Content

This sponsored post features a product relevant to our readers while meeting our editorial guidelines for being objective and educational.

What You'll Be Creating

What Is New Relic Insights?

New Relic Insights combines business metrics, performance data, and customer behaviors in one giant database. And if you're already using New Relic to monitor your application performance, your data is already in the Insights warehouse. 

Insights builds on the core New Relic data collection engine, APM (Application Performance Management), and extends it to include user behavior, business transactions and more. 

Insights starts with a core set of attributes taken from two initial sources:

  1. Transaction events from the New Relic APM agent (APM events)
  2. Page view events from the page load timing process in New Relic Browser (Browser events)

Even more powerfully, though, you can add custom attributes and events and quickly see what's happening with your website features in real time.

If you read Using New Relic to Monitor WordPress Performance (Tuts+), you might already have an active New Relic APM account collecting data about your website. For more information on Browser, check out Front-End Monitoring with New Relic Browser (Tuts+).

Four Main Components

Insights contains four main components:

  1. A high-powered, index-free events database that stores your data in the cloud.
  2. An SQL-flavored query language (NRQL) to read and organize data from the events database.
  3. A simple HTTP request API to add custom attributes and events to the events database and to get data back out again for local applications. New Relic offers support for the API in several different languages (such as Ruby, Java, .NET, PHP, and Python) to make integration simple.
  4. A dashboard management interface with a collection of widgets to help you represent data quickly and clearly. Using the Insights interface, you can quickly and easily build dashboards to identify problems with your servers and applications in real time or to track ongoing data trends and share them with your team.

For example, you can ask questions of the Insights data warehouse using NRQL:

New Relic Insights How many customers in a geography

The NRQL autofill makes learning to build queries simple and intuitive:

New Relic Insights NRQL autofill

Custom attributes allow you to measure and monitor things like the amount of money in shopping carts and then compare it by city:

New Relic Insights Average Cart by City

Or you can assess the success of your design through funnel analysis to see how many homepage visitors are making it through to completed checkouts:

New Relic Insights E-Commerce Funnel

Here's an introductory screencast showing how to integrate NRQL queries with customizable and sharable dashboards:

What Can You Use Insights For?

New Relic offers a number of intriguing examples for using Insights to grow your business:

  • Product Management. Make a query about the adoption of the new features you launched today. Find out which customers are using the features and which aren't. Take action through customer loyalty or sales groups to find out why.
  • Application Developers and IT Operations. A customer opened a support ticket about a potential bug they hit ten minutes ago. You can’t reproduce it. Track this customer’s interactions with your site over the last ten minutes and find the root cause.
  • Marketing. Find out if the new marketing campaign is a homerun or a strikeout in real time. If it’s a homerun, spend more. If it’s a strikeout, kill the campaign before you blow your budget.
  • Sales. Track your customer’s experience and product usage during a free trial. Know immediately if a key stakeholder is having a problem with the product or not using the killer features. Give her a call.
  • Customer Loyalty and Support. Happy customers are the best customers. Track each customer’s engagement and happiness with each click of their mouse. The next time they call support, you’ll already know why they’re calling.
  • Mobile App Owner. You just launched your app in a new country. Track which regions and cities have the most users, so you can be smart about spending your marketing dollars where they're most needed. And compare user session times in the new region to session times in more established regions to measure success.

Here's how Nordstrom Rack HauteLook used the flexibility of Insights configuration to quickly optimize its shipping systems:

Getting Started With Insights

New Relic Insights Ask Your Software Questions Get Answers

To get started, you'll need to register for your free account at New Relic:

Register for New Relic Browser

Once you've completed registration, follow the installation instructions on the page appropriate for your registration. Choose the correct language for your application and follow the simple steps to setup the New Relic Agent specific to your environment.

Setting Up New Relic

Once you have your license key, you can setup and configure your New Relic Agent in minutes. Once you have deployed your application with the Agent on it, you will see this message and can dive right into your application data in minutes!

Connect To Your Application

As part of your Pro Trial with New Relic, you will get access to our APM, Browser, and Insights products. With our APM and Browser products feeding in data from your applications and websites, you can begin to analyze Pageview and Transaction data in real-time in New Relic Insights!

Exploring Insights

Once data starts arriving, you can begin using Insights to study activity recorded from your website. The Insights Visualization Tour details some of the possibilities:

There are three main navigation areas to Insights.

  1. The New Relic Query Language Page
  2. The Data Explorer
  3. Dashboards

1. The New Relic Query Language (NRQL) Page

The Insights home page will let you compose NRQL queries about the application data you've recorded:

New Relic Query Language

The data set is based on typical APM recordings that look individually like this:

PHP Application Page View Events in New Relic APM

Here I'm comparing session traffic from today (Monday) with yesterday (Sunday):

New Relic Insight NRQL

Expanding Data Collection with Custom Attributes

The real power comes when you add custom attributes, as Envato and HauteLook describe in the above videos. This allows you to quickly assess specific slices of activity on your web site in real time.

New Relic Insights Custom Attributes

New Relic code libraries make it easy to add custom data recording to almost any web or mobile application:

New Relic PHP Agent API

Here are some additional examples of common NRQL queries:

New Relic Insights NRQL Example Queries

2. The Data Explorer

New Relic Insights Data Explorer

The Data Explorer allows you to drill down on page views and transactions or other custom events which you create:

New Relic Insights Page View Explorer
New Relic Insights Transaction Explorer

3. Dashboards

You can add results from any NRQL query to any number of customizable dashboards, which you can then share with your team.

Here, I'm creating a Visitors by Country widget for my "Geographic Analysis" dashboard: 

New Relic Insights Create a Dashboard

Here's the resulting dashboard, which is further extensible:

New Relic Insights Dashboards

Here's an example of a more advanced dashboard from the New Relic documentation. It shows the number of live users, trial users, throughput, response time, etc.

New Relic Insights Advanced Dashboards

New Relic Mobile Application

You can also browse Insights from your smartphone and tablet. New Relic offers free mobile applications for both iOS and Android:

New Relic Mobile Application iOS Screenshots

The Community Discussion Forum

New Relic just launched a community forum to help you quickly find answers, exchange information with your fellow New Relic users, and interact with their support and engineering teams when you need more hands-on assistance. 

New Relic Insights Community Forum

Looking Ahead

I hope you've found this overview to be intriguing. New Relic Insights brings some amazing and powerful inquiry tools within reach of businesses of all sizes.

If you'd like a more detailed tour of Insights, watch the hour long webinar below. You can also request a guided demo of New Relic Insights from their website (or by calling 1-888-643-8776). 

The New Relic Insights trial lasts 14 days. After that, Insights costs $250/month and requires a paid account for New Relic APM; this provides storage for 75 million events. Pricing increases incrementally based on the number of events you store.

If you have any questions or suggestions, please post them in the comments. If you'd like to keep up on my future Tuts+ tutorials and other series, please visit my author page or follow @reifman.

MC Frontalot, take us out:

Related Links

Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.