Identify issues and roadblocks

As you migrate your applications to the cloud, you want to catch and correct any unexpected behavior or outcomes as soon as possible. Detecting errors and issues related to your new cloud architecture, performance, and scale is critical—getting the right information at the right time can be the difference between success and failure. Here are the steps to using New Relic to quickly identify issues and roadblocks so you can keep your cloud adoption journey on track for success:

Identify issues and roadblocks

1. Identify components

Create a list all of applications, services, and their underlying server infrastructures in your application portfolio that you want to migrate to the cloud.

2. Identify KPIs

To provide quantifiable measures that your teams can use to assess your migration, identify a list of corporate KPIs (key performance indicators). Using the New Relic platform to measure KPIs helps you eliminate blindspots and see the connections between entities—from your application code, to your cloud infrastructure (including containers running in highly distributed microservices), to your customer experience. Your goal is to create a collection of metrics in several categories that you can visualize in dashboards in New Relic Insights.

To validate cloud improvements, group KPIs in the following categories, from least to most strong:

  • Application and infrastructure performance
  • End-user experience, including website and mobile application performance
  • Audience and content trends
  • DevOps productivity
  • Application revenue analytics
  • Future business goals

3. Deploy monitoring tools

To start monitoring your KPIs, verify that the applications that you want to migrate are compatible with the requirements for the New Relic products you will use. Then, install the New Relic agents:

Deploy New Relic APM

Review the compatibility and requirements and then install APM agents on your application stack.

After installing the APM agents, review the architecture of the applications that you instrumented with an APM agent. Take note of all hosts that are part of each tier of the application stack (database, application, web server, etc.), so you can install New Relic Infrastructure agents on each of those hosts.

Deploy New Relic Browser

In a nutshell, New Relic Browser is a snippet of JavaScript that needs to appear in all of your application's webpages. It has no dependencies on other libraries, so it does not cause additional delays when bringing jQuery or other frameworks into the webpage. There are three ways to install the Browser agent:

Method When to use this method
Enable via New Relic APM Typically, the quickest path is to let the APM agent dynamically inject the snippet into your pages on the server side. This works for many common web technologies, such as .NET, JSP, and other Java solutions. The documentation provides a complete reference for the languages and frameworks that allow this option.
Copy/paste method If you are using an unsupported framework or are in an environment where you can instrument only the webpages but cannot install APM on the backend, use the copy/paste method. New Relic Browser presents a snippet to you directly in the UI, and you copy it and paste it into a global page template on your end. Just pick one that all of your webpages use and put it there, and then the snippet appears on all pages.
Enable via the API You can perform a manual instrumentation, in which your developers add instrumentation to your webpages using a server-side API. New Relic supports this for many server-side languages. Refer to the documentation for an example of how to do this in Java.
Deploy New Relic Infrastructure

After reviewing the requirements for New Relic Infrastructure, install the Infrastructure agent on the hosts that you identified so you can start to gather data for your KPIs.

If you use Ansible, Chef, or Puppet for automation, you can use those tools to deploy Infrastructure agents to your hosts.

Set up alerts

New Relic Alerts is a single integrated solution with a centralized UI to help you focus on the metrics that you care about most. When you set up New Relic Alerts and NRQL alerting, you establish flexible policies and conditions to receive alerts and notifications on multiple channels (email, HipChat, OpsGenie, etc.).

For more detailed information about creating, managing, and using alerts, check out these New Relic University tutorials: Intro to alerting, Alert policies, Alerting incident lifecycle and Notification channels.

4. Set up cloud integrations

Cloud-based integrations available through New Relic include Amazon Web Services (AWS) and Microsoft Azure.

Once your applications are migrated to the cloud and you start to integrate new cloud services, you can use New Relic to monitor and report data about your cloud services, offering you a comprehensive view of your entire architecture in one place. For example, to capture and record AWS account activity for audit and governance purposes, use the New Relic AWS CloudTrail integration.

Tracking error events gives you awareness about API calls and services that have failed, while console logins help you monitor console activity and potential intrusion attempts. Insights collects this event data in Insights so you can display it in a dashboard or alert on it with NRQL.

To gain extended visibility into applications that your code depends on, you can also deploy on-host integrations for commonly used application components, such as MySQL, Apache, and NGNIX. In addition, you can create your own custom on-host integration with the New Relic Integrations SDK.

5. Identify issues and roadblocks

Once your applications are running in the cloud, they may generate new types of errors that are different from the errors that they generated when running on-premise. You can use New Relic APM and Browser to view error events, error metrics, and detailed error traces for your applications. If an error or unhandled exception happens, the data appears on the JavaScript errors page and the APM Error analytics page. From these pages, you can quickly troubleshoot runtime errors. Then, further analyze errors by grouping them according to attributes, by filtering them, or by searching for keywords in the event data.

Each unhandled exception generates a transaction error event in Insights, and the dashboards are updated in real time. Event data is a record of a single event at a particular moment in time and consists of default attributes, like a timestamp, and an event type. You can also add custom attributes to provide more context.

Once you start capturing JavaScript errors as events in Insights, set up NRQL alerting so you can stay on top of your error data.

Use the JavaScript errors page to get visibility into real-time user experience:

JavaScript errors page
rpm.newrelic.com/browser > (select an app) > Browser application > JS errors: Use the charts on this page to get visibility into real-time user experience.

Then, create an Insights dashboard that covers a longer period of time and aligns the error and unhandled exception data with your KPIs:

Insights dashboard - errors
insights.newrelic.com: Use dashboards to align the error and unhandled exception data with your KPIs.

Expert tip for alerting on JavaScript errors

To get notifications for error spikes that are different from known or common JavaScript errors, use the following NRQL query for apps that New Relic Browser monitors:

SELECT count(*) FROM JavaScriptError WHERE appName = '<BrowserAppName>' AND errorClass NOT IN ('<ErrorClass1>','<ErrorClass2>')
  • Replace <BrowserAppName> with the Browser app name that you want to monitor with this alert.

  • Replace <ErrorClass1> and <ErrorClass2> with the on-premise error class names that you do not want New Relic to alert you about.

  • Set the threshold based on the your alerting needs.

Using this query, New Relic alerts you every time a JavaScript error with an error class that is not normally reported occurs.

For more help

Explore the New Relic Platform.

Recommendations for learning more: