Skip to content

Mastering New Relic Insights

  • 18 min read

Ever felt lost in a sea of data, trying to make sense of your application’s performance? You’re not alone. Many developers and DevOps engineers face this challenge daily. It’s like having a treasure chest full of gold, but no map to find the jewels you need. New Relic Insights can be that map. It’s a powerful tool that helps you visualize and explore your data, find answers, and take action. It can turn your raw, messy metrics into clear, actionable insights. This article will guide you through mastering the art of New Relic Insights.

What Is New Relic Insights?

New Relic Insights is an analytics platform built on top of New Relic’s monitoring data. Think of it as a magnifying glass for your application’s performance. It allows you to ask questions about your data, visualize the answers in custom dashboards, and share those insights with your team. You are able to query, analyze, and understand application, infrastructure, and business data in real time.

Unlike other tools that just show pre-built reports, New Relic Insights lets you craft your own queries using NRQL (New Relic Query Language). You aren’t stuck with preset dashboards. You get to build what you need to see. This means you can track what’s most important to you, whether it’s error rates, transaction times, or user behavior.

Why Is New Relic Insights Important?

In today’s fast-paced world, quick answers are key. New Relic Insights offers real-time visibility into your systems. You get to see issues as they arise, not hours or days after the fact. This helps you stay ahead of potential problems and keep your applications running smoothly.

It is important for many reasons:

  • Faster Problem Solving: When issues come up, you need to know where to look. Insights lets you dig into the details, find the root cause, and fix issues faster. This means less downtime and a better user experience.
  • Data-Driven Decisions: Gut feelings are not the best guide for business. Insights lets you back your choices with hard data. You get to see trends, spot patterns, and make smarter choices about your systems and code.
  • Custom Dashboards: Every team has its own needs. Insights lets you craft custom dashboards that show only the metrics you care about. This cuts out the noise and lets you focus on the data that matters most.
  • Collaboration: Insights is not a one-person job. You get to share dashboards and queries with your team. This helps everyone stay on the same page and work toward the same goals.
  • Proactive Monitoring: Waiting for users to report issues is not ideal. Insights lets you set up alerts based on your data. This helps you catch problems early, before they impact users.

Core Components of New Relic Insights

Before you begin to use New Relic Insights, it’s good to know the pieces that make up the platform. These pieces work together to help you get the most from your data.

Events

Events are the building blocks of New Relic Insights. They are records of things that happen in your system. Every transaction, error, or page view is recorded as an event. These events are what you query and analyze.

There are many kinds of events, such as:

  • Transaction Events: These show the flow of requests through your application. You can see how long each part of a transaction takes. This is key for finding performance issues.
  • Error Events: When things go wrong, error events are logged. These events show what went wrong, where it happened, and how many times it has occurred.
  • Page View Events: These record how users interact with your site. You get to see what pages they visit, how long they stay, and what devices they use.
  • Custom Events: You get to make your own events. This helps you track things that are unique to your business. It may be user actions, database calls, or third party service integrations.

NRQL (New Relic Query Language)

NRQL is the language used to query your event data. It’s much like SQL, but made for time series data. If you know SQL, you can pick up NRQL fast. With NRQL you get to ask complex questions and pull out the exact data you need.

Some common NRQL commands include:

  • SELECT: Choose which data you want to see.
  • FROM: Pick which event type you want to query.
  • WHERE: Filter the data to only show what you need.
  • TIMESERIES: Plot data over time.
  • FACET: Group data by a certain attribute.
  • LIMIT: Restrict the number of results.

Dashboards

Dashboards are collections of charts and tables that display the data you have queried. They are where you visualize and share your data with the team. You can customize dashboards to meet your needs, using different chart types and widgets.

Dashboards can include:

  • Line Charts: These are used to show trends over time.
  • Bar Charts: These help compare different categories of data.
  • Pie Charts: These show the parts of a whole.
  • Tables: These display data in a structured way.
  • Single Value Widgets: These show a single key metric, like average response time.

Alerts

Alerts notify you when something goes wrong. They watch your data and send an alert when a metric goes over or below a set threshold. You get to configure alerts for any of the data points you collect.

Alerts help you be proactive by:

  • Real-Time Notifications: Get emails, Slack messages, or other notifications when an issue arises.
  • Custom Conditions: Set up alerts based on your needs. You get to pick the metrics, thresholds, and time windows.
  • Reduced Downtime: Catch problems early, before they affect users.
  • Integration: Connect alerts to your other tools to form a better incident response plan.

Setting Up New Relic Insights

Getting started with New Relic Insights is not hard, but it requires a few key steps. Here’s a step-by-step guide to help you begin:

Step 1: Install New Relic Agents

To see data in Insights, you must first get the data in New Relic. The way to do this is to install New Relic Agents in your application and infrastructure.

  • Choose Your Agent: New Relic offers agents for many languages and platforms. Pick the agent that matches your setup. This might be Java, Python, Node.js, Ruby, or something else.
  • Follow the Instructions: New Relic has clear install guides for each agent. Follow the steps closely to make sure it’s set up the right way.
  • Verify the Installation: After setup, check to make sure the agent is sending data to New Relic. You should start to see metrics in the New Relic UI.

Step 2: Access New Relic Insights

Once you are sending data to New Relic, you may now use Insights.

  • Navigate to Insights: From the New Relic UI, find and click on the “Insights” option. It is usually in the main menu.
  • Explore the Interface: Spend some time looking at the Insights interface. Find the query builder, dashboard list, and alert settings.
  • Review Example Queries: New Relic gives you many sample queries to help you learn. It’s good to look at these to understand how NRQL works.

Step 3: Craft Your First NRQL Query

Now it’s time to start using NRQL.

  • Start Simple: Begin with a basic query, such as SELECT average(duration) FROM Transaction. This shows the average transaction time for your app.
  • Experiment: Change the query to see different data. Add a WHERE clause to filter results, or a FACET to group data.
  • Use the Query Builder: New Relic has a visual query builder if you want to start there. It can help you build queries if you’re not comfy writing them.
  • Save Your Queries: If you find a query you like, save it to use later.

Step 4: Build Your First Dashboard

Once you have some queries, you can build a dashboard.

  • Start a New Dashboard: Go to the dashboard section and make a new dashboard.
  • Add Widgets: Add charts and tables to your dashboard. Pick the widgets that work best for your data and queries.
  • Arrange the Widgets: Put the widgets on your dashboard in a way that is easy to read. Use clear titles and labels.
  • Share the Dashboard: Share the dashboard with your team. You may give them read-only access or edit rights.

Step 5: Set Up Alerts

Alerts are key to proactive monitoring.

  • Create a New Alert: Go to the alert section and make a new alert.
  • Choose an Alert Type: You may select from many alert conditions. Pick the ones that match the metrics you want to track.
  • Set Thresholds: Pick the threshold values that trigger the alert. For example, alert when average response time goes above a certain number.
  • Pick Notifications: Set up how you will be notified. This may be email, Slack, or a webhook for your custom system.

Mastering NRQL

NRQL is the heart of New Relic Insights. It’s how you ask questions of your data. Mastering it opens up new ways to understand your systems.

Basic Syntax

The basic structure of an NRQL query looks like this:

SELECT attribute1, attribute2
FROM eventType
WHERE condition1 AND condition2
TIMESERIES timeWindow
FACET attribute3
LIMIT numberOfResults
  • SELECT: This clause picks which data you want to see.
  • FROM: This clause picks what type of event you’re querying.
  • WHERE: This clause filters events based on the conditions.
  • TIMESERIES: This clause groups data points over a time range.
  • FACET: This clause groups results based on a specific attribute.
  • LIMIT: This clause limits the number of results that are returned.

Common Functions

NRQL has a lot of functions that help you analyze your data:

  • average(attribute): Gets the average value of an attribute.
  • sum(attribute): Gets the sum of all values of an attribute.
  • min(attribute): Gets the smallest value of an attribute.
  • max(attribute): Gets the largest value of an attribute.
  • count(*): Counts how many events match the query.
  • uniqueCount(attribute): Counts how many unique values of an attribute there are.
  • percentile(attribute, percentile): Calculates the value at a given percentile.
  • rate(attribute, time): Calculates the rate of change of an attribute.

Examples

Here are some examples of NRQL queries and what they do:

  1. Get the average response time for all transactions:
SELECT average(duration) FROM Transaction
  1. Get the number of errors in the past hour:
SELECT count(*) FROM TransactionError SINCE 1 hour ago
  1. Get the top 10 slowest transactions, grouped by name:
SELECT average(duration) FROM Transaction FACET name ORDER BY average(duration) DESC LIMIT 10
  1. Get the number of page views per browser:
SELECT count(*) FROM PageView FACET userAgentName
  1. Get the 99th percentile response time over the last 10 minutes, divided into 1 minute intervals:
SELECT percentile(duration, 99) FROM Transaction TIMESERIES 1 minute SINCE 10 minutes ago

Advanced NRQL Techniques

As you get better with NRQL, there are a few advanced techniques you may use to help you get the most from your data:

  • Nested Queries: You may use the output of one query as the input for another query. This helps you do complex data analysis.
  • String Functions: Use functions like LIKE, CONTAINS, and SUBSTR to analyze string data. This is useful for finding patterns in text attributes.
  • Case Statements: Use CASE statements to make different outputs based on conditions.
  • Time Windows: Use time clauses like SINCE, UNTIL, LAST WEEK, and THIS MONTH to work with different time ranges.
  • Combining Data: Use JOIN to combine data from multiple event types.

Building Effective Dashboards

Dashboards are where you bring your data to life. A good dashboard makes it easy to see, understand, and act on your data. Here are some best practices for building dashboards:

Define Your Goals

Before you begin to build a dashboard, you must know what you want to achieve. Do you need to track application performance, user behavior, or some business metric? Knowing the purpose of your dashboard will guide the metrics you choose and the charts you use.

Pick the Right Charts

Different charts display different types of data. Picking the right chart is key to clear data presentation.

  • Line Charts: Use line charts to display trends over time. These charts are good for tracking things like response times, error rates, and traffic volume.
  • Bar Charts: Use bar charts to compare different categories. These charts work well for showing the number of errors per application, or the number of page views per browser.
  • Pie Charts: Use pie charts to show the parts of a whole. These charts are good for showing the breakdown of traffic sources, or the distribution of error types.
  • Tables: Use tables to show data in a structured way. Tables are good for displaying detailed information like individual transaction times or error messages.
  • Single Value Widgets: Use single value widgets to highlight key metrics. You might use these to display average response times, or error rates.

Make It Easy to Read

Dashboards should be easy to look at and understand.

  • Use clear titles and labels: Give every chart and widget a clear title. Label all axes and data points, to help you know what each piece of data means.
  • Keep it simple: Do not overload the dashboard with too much data. Focus on the key metrics and remove all extra noise.
  • Organize the widgets: Place the widgets in a logical layout. You may group related data together. You may use a grid layout to keep it clean.
  • Use color wisely: Use colors to add to the message of your data. You should avoid using too many colors.

Customize Your Dashboard

Insights lets you customize your dashboard to meet your needs.

  • Use custom NRQL queries: Use custom NRQL queries to show the exact data you need. Do not rely on pre-built charts and metrics.
  • Use widgets wisely: Insights has a lot of widgets. Pick the ones that work best for you and your team.
  • Use links: Link widgets together so you can dig deeper into your data.
  • Add notes: Add notes to your dashboard to add context. This may be notes for your team on how to use the dashboard.

Share Your Dashboard

Dashboards are not meant to be used alone. Share them with your team to encourage collaboration and transparency.

  • Set user rights: Give read-only rights to some users and edit rights to others.
  • Share links: Share links to dashboards with your team.
  • Embed dashboards: Embed your dashboards into other tools, like Confluence or Slack.

Setting Up Effective Alerts

Alerts are key to proactive monitoring. They let you know when something goes wrong, before your users notice. Here’s how to set up useful alerts:

Choose the Right Metrics

Pick metrics that matter to your systems and your business. These may be average response time, error rates, or server CPU usage. Choose the metrics that will give you the best idea of how well your application is running.

Set Thresholds Wisely

Thresholds are the values that trigger an alert. Setting them too high or too low may cause too many false alarms or miss real issues.

  • Use baseline data: Begin by looking at your historical data to find normal levels for your metrics.
  • Be specific: Set different thresholds for different metrics. What is normal for a transaction, is not normal for errors.
  • Adjust thresholds: Check your thresholds often. Adjust them as needed to avoid both false alarms and missed issues.

Pick Notification Channels

You should be notified as soon as an alert fires. Pick channels that work for your team.

  • Email: Email is good for less pressing alerts.
  • Slack: Slack is good for quick updates and team discussion.
  • PagerDuty: PagerDuty is good for critical alerts that need immediate action.
  • Webhooks: Webhooks may be used to connect alerts to custom tools.

Create Clear Messages

When an alert fires, the message must be clear and detailed.

  • Add context: Provide the metric, the threshold, and the time range in the alert message.
  • Add links: Add links to dashboards that show more details of the issue.
  • Be specific: Make sure the message is specific to the problem, so the team knows what action to take.

Avoid Alert Fatigue

Alert fatigue happens when there are too many alerts. It leads to alert fatigue, causing teams to ignore or dismiss them.

  • Consolidate alerts: Combine alerts when needed. You don’t need a separate alert for every metric.
  • Filter alerts: Filter alerts so they only trigger at the right time. You may set time windows to stop alerts firing when you are not at work.
  • Prioritize alerts: Tag alerts as critical, high, or low. This will help your team focus on the right alerts first.

Use Cases for New Relic Insights

New Relic Insights may be used for many purposes. Here are some common use cases:

Application Performance Monitoring

  • Track Transaction Time: See the average, min, and max time for each transaction. This helps find slow parts of your application.
  • Monitor Error Rates: Track error rates and see what type of errors are occurring.
  • Identify Slow Queries: Pinpoint slow database queries and make changes to speed them up.
  • Optimize Code: Use data to guide your code changes. This helps make sure that performance is improving.

Infrastructure Monitoring

  • Monitor CPU Usage: Track CPU usage of your servers. This will let you know if you are running out of resources.
  • Track Memory Usage: Track memory use to make sure your systems have enough memory to run well.
  • See Disk Usage: See how much disk space is being used and avoid disk space issues.
  • Monitor Network Traffic: Track network traffic to see if there are network related issues.

User Behavior Analysis

  • Track Page Views: See how many users visit each of your pages. This can help you learn which pages are popular, and which are not.
  • Track User Sessions: Track user sessions to learn how users interact with your site.
  • Track User Agents: See what browsers and devices your users are using. This can help you ensure the application works on all devices.
  • Track Custom Events: Track custom events to learn more about user actions that are specific to your business.

Business Metrics

  • Track Conversion Rates: Track conversion rates to see how well your business is doing.
  • Monitor Sales: Track sales to see if business is growing.
  • Track User Engagement: Track user engagement metrics like time on site, page views, etc.
  • Track Key Performance Indicators (KPIs): Track business KPIs that are key to business success.

Custom Analysis

  • Combine Data: Combine data from many sources to find unique insights.
  • Use Data for Testing: Use data from Insights to help with A/B testing, and see which changes have the best results.
  • Report to Management: Use dashboards to show management and leadership how the business is performing.

Tips for Success with New Relic Insights

Here are some key tips to help you be successful with New Relic Insights:

  • Start Simple: Do not try to do too much at once. Begin with basic queries and dashboards. Add more as you get better with the tools.
  • Learn NRQL: Spend time learning NRQL, as it’s the main way to query your data. The more you know about NRQL, the better you’ll be at using Insights.
  • Use Dashboards Wisely: Build clear, easy to read dashboards that show key metrics. Customize your dashboards so they meet the needs of your team.
  • Set Up Useful Alerts: Set up alerts based on key metrics. Make sure thresholds are set right and messages are clear.
  • Analyze Data Often: Make a habit of looking at your data, to spot trends and fix issues. The more often you look at your data, the more you learn from it.
  • Ask Questions: Ask your data questions. The more you ask, the more you will learn.
  • Share Your Work: Share your queries, dashboards, and insights with your team, so you can work together to improve your systems.
  • Use New Relic Docs: New Relic offers in-depth docs on all features. Use these docs to learn more, and keep learning.
  • Join the Community: Join the New Relic community. You may find answers and share your tips with other users.
  • Keep Learning: New Relic keeps adding new features. Keep learning to make the best use of this tool.

Should You Dive Into New Relic Insights?

New Relic Insights is a powerful tool that helps you unlock the value of your data. You can see more of the data, find the answers you seek, and take action based on what you see.

If you’re a developer or DevOps engineer who cares about getting the most from your systems, New Relic Insights is worth a deep look. It will take time to learn, but you will find great benefit. The tool helps you make better decisions, solve issues faster, and keep your applications running well.

The key is not just knowing the tool, but how to use it best for your team and business. By mastering NRQL, using dashboards wisely, and setting up smart alerts, you can turn your raw data into actionable insights. This will help you stay ahead of the game and deliver a better experience for your users. If you are ready to dive in, prepare to see your data in a whole new light.